mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +01:00
Fix arc browse path:line
Summary: Ref T5781. This was broken in some earlier changes in T5781. Test Plan: Ran `arc browse README`, `arc browse README:10`. Reviewers: chad, btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5781 Differential Revision: https://secure.phabricator.com/D10346
This commit is contained in:
parent
7e901d8b4f
commit
e336b04aa1
1 changed files with 14 additions and 2 deletions
|
@ -144,7 +144,13 @@ EOTEXT
|
|||
// If we fail, try to resolve them as paths.
|
||||
|
||||
foreach ($things as $key => $path) {
|
||||
$path = preg_replace('/:([0-9]+)$/', '$\1', $path);
|
||||
$line = null;
|
||||
$parts = explode(':', $path);
|
||||
if (count($parts) > 1) {
|
||||
$line = (int)array_pop($parts);
|
||||
}
|
||||
$path = implode(':', $parts);
|
||||
|
||||
$full_path = Filesystem::resolvePath($path);
|
||||
|
||||
if (!$is_force && !Filesystem::pathExists($full_path)) {
|
||||
|
@ -165,7 +171,13 @@ EOTEXT
|
|||
}
|
||||
|
||||
$base_uri = $this->getBaseURI();
|
||||
$uris[] = $base_uri.$path;
|
||||
$uri = $base_uri.$path;
|
||||
|
||||
if ($line) {
|
||||
$uri = $uri.'$'.$line;
|
||||
}
|
||||
|
||||
$uris[] = $uri;
|
||||
}
|
||||
} else {
|
||||
if ($things) {
|
||||
|
|
Loading…
Reference in a new issue