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:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user