summaryrefslogtreecommitdiffstats
path: root/ProcessWin32.c
diff options
context:
space:
mode:
Diffstat (limited to 'ProcessWin32.c')
-rw-r--r--ProcessWin32.c5
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. */