mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 12:30:56 +01:00
Fix issue when a path is '/' in a package
Summary: when a path is '/' in defining a package, D1251 is generating an extra '//'. Test Plan: veryfied adding path '/', '/src' and '/src/' all worked. Reviewers: nh, epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1266
This commit is contained in:
parent
99a9c082f9
commit
682fb6f519
1 changed files with 3 additions and 1 deletions
|
@ -211,7 +211,9 @@ class PhabricatorOwnersPackage extends PhabricatorOwnersDAO {
|
|||
if ($is_directory && substr($path, -1) != '/') {
|
||||
$path .= '/';
|
||||
}
|
||||
$path = '/'.$path;
|
||||
if (substr($path, 0, 1) != '/') {
|
||||
$path = '/'.$path;
|
||||
}
|
||||
if (empty($cur_paths[$repository_phid][$path]) && $valid) {
|
||||
$obj = new PhabricatorOwnersPath();
|
||||
$obj->setPackageID($this->getID());
|
||||
|
|
Loading…
Reference in a new issue