1
0
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:
Yasuhiro Matsumoto
2022-05-03 11:02:28 +01:00
committed by Bram Moolenaar
parent 3a974a8933
commit 05cf63e9bd
4 changed files with 29 additions and 3 deletions

View File

@@ -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);
}
}