all uses of mksh_vdirsep should exclude “\builtin” from triggering it

This commit is contained in:
tg
2017-10-11 21:09:24 +00:00
parent 5a89f6d959
commit af61fd186a
2 changed files with 7 additions and 10 deletions

8
exec.c
View File

@@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.200 2017/10/11 21:04:59 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.201 2017/10/11 21:09:24 tg Exp $");
#ifndef MKSH_DEFAULT_EXECSHELL
#define MKSH_DEFAULT_EXECSHELL MKSH_UNIXROOT "/bin/sh"
@@ -1172,11 +1172,7 @@ findcom(const char *name, int flags)
char *fpath;
union mksh_cchack npath;
if (mksh_vdirsep(name)
#ifdef MKSH_DOSPATH
&& (strcmp(name, T_builtin) != 0)
#endif
) {
if (mksh_vdirsep(name)) {
insert = 0;
/* prevent FPATH search below */
flags &= ~FC_FUNC;