mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 07:11:04 +01:00
Fix Owners package specificity ordering
Summary: This algorithm isn't quite right with respect to ordering more-specific packages correctly. Test Plan: {F729864} Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D13929
This commit is contained in:
parent
13346ea904
commit
0a509ea7ec
1 changed files with 5 additions and 2 deletions
|
@ -230,16 +230,19 @@ final class PhabricatorOwnersPackage
|
|||
}
|
||||
|
||||
public static function splitPath($path) {
|
||||
$result = array('/');
|
||||
$trailing_slash = preg_match('@/$@', $path) ? '/' : '';
|
||||
$path = trim($path, '/');
|
||||
$parts = explode('/', $path);
|
||||
|
||||
$result = array();
|
||||
while (count($parts)) {
|
||||
$result[] = '/'.implode('/', $parts).$trailing_slash;
|
||||
$trailing_slash = '/';
|
||||
array_pop($parts);
|
||||
}
|
||||
return $result;
|
||||
$result[] = '/';
|
||||
|
||||
return array_reverse($result);
|
||||
}
|
||||
|
||||
public function attachPaths(array $paths) {
|
||||
|
|
Loading…
Reference in a new issue