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

2
exec.c
View File

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