mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
libuv: win: honor NoDefaultCurrentDirectoryInExePath env var
Backport commit 5e302730cd (win: honor NoDefaultCurrentDirectoryInExePath env var, 2023-12-01) from libuv PR 4238.
This commit is contained in:
@@ -391,10 +391,12 @@ static WCHAR* search_path(const WCHAR *file,
|
||||
} else {
|
||||
dir_end = path;
|
||||
|
||||
/* The file is really only a name; look in cwd first, then scan path */
|
||||
result = path_search_walk_ext(L"", 0,
|
||||
file, file_len,
|
||||
cwd, cwd_len);
|
||||
if (NeedCurrentDirectoryForExePathW(L"")) {
|
||||
/* The file is really only a name; look in cwd first, then scan path */
|
||||
result = path_search_walk_ext(L"", 0,
|
||||
file, file_len,
|
||||
cwd, cwd_len);
|
||||
}
|
||||
|
||||
while (result == NULL) {
|
||||
if (dir_end == NULL || *dir_end == L'\0') {
|
||||
|
||||
Reference in New Issue
Block a user