diff options
author | KWSys Upstream <kwrobot@kitware.com> | 2021-01-25 15:05:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-25 15:06:13 (GMT) |
commit | 4faaa079e3b464643bc90802381119685f5a586d (patch) | |
tree | 5d34fa8d7fd6f596cfa60edc2a18cfd2851ce9b8 | |
parent | 3887390a375ffb0bda5bd6d3758e10fe3645fc3d (diff) | |
download | CMake-4faaa079e3b464643bc90802381119685f5a586d.zip CMake-4faaa079e3b464643bc90802381119685f5a586d.tar.gz CMake-4faaa079e3b464643bc90802381119685f5a586d.tar.bz2 |
KWSys 2021-01-25 (10e36d47)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 10e36d47415840a0318331733460183152a0feb9 (master).
Upstream Shortlog
-----------------
Martin Storsjö (1):
fca5ad3a Process: Fix execute error handling re working dir on windows
-rw-r--r-- | ProcessWin32.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ProcessWin32.c b/ProcessWin32.c index 1267076..8f01684 100644 --- a/ProcessWin32.c +++ b/ProcessWin32.c @@ -962,7 +962,10 @@ void kwsysProcess_Execute(kwsysProcess* cp) kwsysProcessCleanup(cp, GetLastError()); return; } - SetCurrentDirectoryW(cp->WorkingDirectory); + if (!SetCurrentDirectoryW(cp->WorkingDirectory)) { + kwsysProcessCleanup(cp, GetLastError()); + return; + } } /* Setup the stdin pipe for the first process. */ |