mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
two more /tmp references that aren't necessary
Eliminate two more references to /tmp as part of removing our dependency on /tmp being a valid directory.
This commit is contained in:
parent
49518b71ab
commit
8440308470
1 changed files with 2 additions and 2 deletions
|
@ -631,13 +631,13 @@ void wildcard_expander_t::expand_trailing_slash(const wcstring &base_dir, const
|
|||
}
|
||||
|
||||
if (!(flags & EXPAND_FOR_COMPLETIONS)) {
|
||||
// Trailing slash and not accepting incomplete, e.g. `echo /tmp/`. Insert this file if it
|
||||
// Trailing slash and not accepting incomplete, e.g. `echo /xyz/`. Insert this file if it
|
||||
// exists.
|
||||
if (waccess(base_dir, F_OK) == 0) {
|
||||
this->add_expansion_result(base_dir);
|
||||
}
|
||||
} else {
|
||||
// Trailing slashes and accepting incomplete, e.g. `echo /tmp/<tab>`. Everything is added.
|
||||
// Trailing slashes and accepting incomplete, e.g. `echo /xyz/<tab>`. Everything is added.
|
||||
DIR *dir = open_dir(base_dir);
|
||||
if (dir) {
|
||||
wcstring next;
|
||||
|
|
Loading…
Reference in a new issue