exec: remove the last / or \ when searching $PATH
For example, X:/ becomes to X://name. CMD.EXE is not tolerant of such a style. modified: exec.c
This commit is contained in:
parent
bf88879b0d
commit
f814ccfb8f
4
exec.c
4
exec.c
@ -1327,6 +1327,10 @@ search_path(const char *name, const char *lpath,
|
|||||||
XcheckN(xs, xp, p - sp);
|
XcheckN(xs, xp, p - sp);
|
||||||
memcpy(xp, sp, p - sp);
|
memcpy(xp, sp, p - sp);
|
||||||
xp += p - sp;
|
xp += p - sp;
|
||||||
|
#ifdef __OS2__
|
||||||
|
if (xp > Xstring(xs, xp) && mksh_cdirsep(xp[-1]))
|
||||||
|
xp--;
|
||||||
|
#endif
|
||||||
*xp++ = '/';
|
*xp++ = '/';
|
||||||
}
|
}
|
||||||
sp = p;
|
sp = p;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user