diff options
author | Brad King <brad.king@kitware.com> | 2023-12-04 14:38:38 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-12-04 14:38:54 (GMT) |
commit | b9970be9bcadc8f7c45f7603ad6eb1c75620608a (patch) | |
tree | e1d867f13d56370904b4ad5f87529216c661f6e9 | |
parent | 8bd78627dd3d4d2b6f83a4b688ad97cc71840857 (diff) | |
parent | ab561b86fb4b1715ae6f65483d99833f97031fb3 (diff) | |
download | CMake-b9970be9bcadc8f7c45f7603ad6eb1c75620608a.zip CMake-b9970be9bcadc8f7c45f7603ad6eb1c75620608a.tar.gz CMake-b9970be9bcadc8f7c45f7603ad6eb1c75620608a.tar.bz2 |
Merge topic 'libuv-win-no-default-current-directory' into release-3.28
ab561b86fb libuv: win: honor NoDefaultCurrentDirectoryInExePath env var
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9022
-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') { |