forked from aniani/vim
patch 8.2.4860: MS-Windows: always uses current directory for executables
Problem: MS-Windows: always uses current directory for executables. Solution: Check the NoDefaultCurrentDirectoryInExePath environment variable. (Yasuhiro Matsumoto, closes #10341)
This commit is contained in:
committed by
Bram Moolenaar
parent
3a974a8933
commit
05cf63e9bd
@@ -2237,7 +2237,11 @@ executable_exists(char *name, char_u **path, int use_path, int use_pathext)
|
||||
retval = FALSE;
|
||||
goto theend;
|
||||
}
|
||||
STRCPY(pathbuf, ".;");
|
||||
|
||||
if (mch_getenv("NoDefaultCurrentDirectoryInExePath") == NULL)
|
||||
STRCPY(pathbuf, ".;");
|
||||
else
|
||||
*pathbuf = NUL;
|
||||
STRCAT(pathbuf, p);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user