diff options
Diffstat (limited to 'Utilities/cmlibuv')
-rw-r--r-- | Utilities/cmlibuv/src/win/process.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Utilities/cmlibuv/src/win/process.c b/Utilities/cmlibuv/src/win/process.c index 172b80b..02b6c26 100644 --- a/Utilities/cmlibuv/src/win/process.c +++ b/Utilities/cmlibuv/src/win/process.c @@ -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') { |