mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 03:13:37 +08:00
resolve: Use the new real path
This failed for /bin/foo/bar if /bin is a symlink to /usr/bin and foo doesn't exist. It returned /bin/foo/bar instead of the correct /usr/bin/foo/bar.
This commit is contained in:
parent
80e04a1e86
commit
d13ba046b0
|
@ -643,9 +643,9 @@ static int path_resolve(parser_t &parser, io_streams_t &streams, int argc, const
|
|||
next = wdirname(next);
|
||||
real = wrealpath(next);
|
||||
if (real) {
|
||||
next.push_back(L'/');
|
||||
next.append(rest);
|
||||
real = normalize_path(next, false);
|
||||
real->push_back(L'/');
|
||||
real->append(rest);
|
||||
real = normalize_path(*real, false);
|
||||
break;
|
||||
}
|
||||
rest = wbasename(next) + L'/' + rest;
|
||||
|
|
Loading…
Reference in New Issue
Block a user