summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/ProcessWin32.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-25 15:06:13 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-25 15:06:13 (GMT)
commit1bd1f96f3ffbdedd76a325c393548fbce53e83bf (patch)
tree550e1ec0e5017875fdcb19553c8c7f57d6bb008a /Source/kwsys/ProcessWin32.c
parent902f0c59fdde27110143370326ee53eef5f018b2 (diff)
parent4faaa079e3b464643bc90802381119685f5a586d (diff)
downloadCMake-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.c5
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. */