exec: set ev to ENOENT properly

modified:   exec.c
This commit is contained in:
KO Myung-Hun 2016-12-22 13:06:59 +09:00
parent 1b4d572b77
commit 6739812ea6
1 changed files with 1 additions and 1 deletions

2
exec.c
View File

@ -1338,7 +1338,7 @@ search_path(const char *name, const char *lpath,
* current directory. For example, PATH=;...;;...;
*/
if (!mksh_vdirsep(Xstring(xs, xp)))
/* nothing */;
ev = ENOENT;
else
#endif
if ((ev = search_access(Xstring(xs, xp), mode)) == 0) {