summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-04 14:38:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-12-04 14:38:55 (GMT)
commitb629dc3861d0e3ef8219f5e1edcebb56353fa598 (patch)
tree215fa3ede5f996bcf8983ce5e02b6eee620acf2d
parentf72ffe9f7fb367f608379ade001a0c813ec77e2a (diff)
parentab561b86fb4b1715ae6f65483d99833f97031fb3 (diff)
downloadCMake-b629dc3861d0e3ef8219f5e1edcebb56353fa598.zip
CMake-b629dc3861d0e3ef8219f5e1edcebb56353fa598.tar.gz
CMake-b629dc3861d0e3ef8219f5e1edcebb56353fa598.tar.bz2
Merge topic 'libuv-win-no-default-current-directory'
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.c10
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') {