diff options
-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. */ |