mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 16:21:15 -03:00
Handle odd return codes for waccess(..) in src/path.cpp under Solaris
This commit is contained in:
13
src/path.cpp
13
src/path.cpp
@@ -80,12 +80,21 @@ static bool path_get_path_core(const wcstring &cmd, wcstring *out_path,
|
||||
err = EACCES;
|
||||
} else {
|
||||
switch (errno) {
|
||||
case ENOENT:
|
||||
case ENAMETOOLONG:
|
||||
case EACCES:
|
||||
case ENAMETOOLONG:
|
||||
case ENOENT:
|
||||
case ENOTDIR: {
|
||||
break;
|
||||
}
|
||||
#ifdef __sun
|
||||
//Solaris 5.11 can return any of the following three if the path
|
||||
//does not exist. Yes, even 0. No, none of this is documented.
|
||||
case 0:
|
||||
case EAGAIN:
|
||||
case EEXIST: {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
//WSL has a bug where access(2) can return EINVAL
|
||||
//See https://github.com/Microsoft/BashOnWindows/issues/2522
|
||||
//The only other way EINVAL can happen is if the wrong
|
||||
|
||||
Reference in New Issue
Block a user