summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2021-01-25 10:05:14 -0500
committerBrad King <brad.king@kitware.com>2021-01-25 10:06:13 -0500
commit4faaa079e3b464643bc90802381119685f5a586d (patch)
tree5d34fa8d7fd6f596cfa60edc2a18cfd2851ce9b8
parent3887390a375ffb0bda5bd6d3758e10fe3645fc3d (diff)
downloadcmake-4faaa079e3b464643bc90802381119685f5a586d.tar.gz
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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ProcessWin32.c b/ProcessWin32.c
index 12670762d9..8f01684a1a 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. */