diff options
author | Brad King <brad.king@kitware.com> | 2021-01-26 14:00:48 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-01-26 14:01:28 (GMT) |
commit | cad804e2c4b3dd461b328a42a0e1535923032e23 (patch) | |
tree | 8717e10cdbb210607aea1ee8239cbf91c34e53c1 | |
parent | a5124f6bad869a88a63551c494aaaeb2b9272590 (diff) | |
parent | 1bd1f96f3ffbdedd76a325c393548fbce53e83bf (diff) | |
download | CMake-cad804e2c4b3dd461b328a42a0e1535923032e23.zip CMake-cad804e2c4b3dd461b328a42a0e1535923032e23.tar.gz CMake-cad804e2c4b3dd461b328a42a0e1535923032e23.tar.bz2 |
Merge topic 'update-kwsys'
1bd1f96f3f Merge branch 'upstream-KWSys' into update-kwsys
4faaa079e3 KWSys 2021-01-25 (10e36d47)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Martin Storsjö <martin@martin.st>
Merge-request: !5736
-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. */ |