diff options
author | Brad King <brad.king@kitware.com> | 2021-01-25 15:06:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-25 15:06:13 (GMT) |
commit | 1bd1f96f3ffbdedd76a325c393548fbce53e83bf (patch) | |
tree | 550e1ec0e5017875fdcb19553c8c7f57d6bb008a /Source/kwsys/ProcessWin32.c | |
parent | 902f0c59fdde27110143370326ee53eef5f018b2 (diff) | |
parent | 4faaa079e3b464643bc90802381119685f5a586d (diff) | |
download | CMake-1bd1f96f3ffbdedd76a325c393548fbce53e83bf.zip CMake-1bd1f96f3ffbdedd76a325c393548fbce53e83bf.tar.gz CMake-1bd1f96f3ffbdedd76a325c393548fbce53e83bf.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
KWSys 2021-01-25 (10e36d47)
Diffstat (limited to 'Source/kwsys/ProcessWin32.c')
-rw-r--r-- | Source/kwsys/ProcessWin32.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index 1267076..8f01684 100644 --- a/Source/kwsys/ProcessWin32.c +++ b/Source/kwsys/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. */ |