mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +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) != '/') {
|
if ($is_directory && substr($path, -1) != '/') {
|
||||||
$path .= '/';
|
$path .= '/';
|
||||||
}
|
}
|
||||||
|
if (substr($path, 0, 1) != '/') {
|
||||||
$path = '/'.$path;
|
$path = '/'.$path;
|
||||||
|
}
|
||||||
if (empty($cur_paths[$repository_phid][$path]) && $valid) {
|
if (empty($cur_paths[$repository_phid][$path]) && $valid) {
|
||||||
$obj = new PhabricatorOwnersPath();
|
$obj = new PhabricatorOwnersPath();
|
||||||
$obj->setPackageID($this->getID());
|
$obj->setPackageID($this->getID());
|
||||||
|
|
Loading…
Reference in a new issue