mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03: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:
@@ -631,13 +631,13 @@ void wildcard_expander_t::expand_trailing_slash(const wcstring &base_dir, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & EXPAND_FOR_COMPLETIONS)) {
|
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.
|
// exists.
|
||||||
if (waccess(base_dir, F_OK) == 0) {
|
if (waccess(base_dir, F_OK) == 0) {
|
||||||
this->add_expansion_result(base_dir);
|
this->add_expansion_result(base_dir);
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
DIR *dir = open_dir(base_dir);
|
||||||
if (dir) {
|
if (dir) {
|
||||||
wcstring next;
|
wcstring next;
|
||||||
|
|||||||
Reference in New Issue
Block a user