diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 5430619..5e15b5a 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -788,10 +788,10 @@ bool cmCTestScriptHandler::EmptyBinaryDirectory(const char *sname) // try to avoid deleting directories that we shouldn't std::string check = sname; check += "/CMakeCache.txt"; - if (cmSystemTools::FileExists(check.c_str())) + if(cmSystemTools::FileExists(check.c_str()) && + !cmSystemTools::RemoveADirectory(sname)) { - cmSystemTools::RemoveADirectory(sname); - return true; + return false; } - return false; + return true; } |