mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 15:07:32 +08:00
Bravely remove a call to wrealpath in globbing
When globbing, we have a base directory (typically $PWD) and a path component relative to that. As PWD is "virtual" it may be a symlink. Prior to this change we would use wrealpath to resolve symlinks before opening the directory during a glob, but this call to wrealpath consumed roughly half of the time during globbing, and is conceptually unnecessary as opendir will resolve symlinks for us. Remove it. This may have funny effects if the user's PWD is an unlinked directory, but it roughly doubles the speed of a glob like `echo ~/**`.
This commit is contained in:
parent
8a29fa6778
commit
91503151c9
|
@ -695,11 +695,6 @@ class wildcard_expander_t {
|
|||
// cd operates on logical paths.
|
||||
// for example, cd ../<tab> should complete "without resolving symlinks".
|
||||
path = normalize_path(path);
|
||||
} else {
|
||||
// Other commands operate on physical paths.
|
||||
if (auto tmp = wrealpath(path)) {
|
||||
path = tmp.acquire();
|
||||
}
|
||||
}
|
||||
return wopendir(path);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user