summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-03-11 17:56:10 (GMT)
committerBrad King <brad.king@kitware.com>2005-03-11 17:56:10 (GMT)
commit1ab9f4747d2c306cdbc440fb506ba90bc6802250 (patch)
tree0c4ec39343b017a105d91a22fb3aebdd314facca /Source/CTest/cmCTestScriptHandler.cxx
parenta1de57485109518c925aa203c926fe7e614fe028 (diff)
downloadCMake-1ab9f4747d2c306cdbc440fb506ba90bc6802250.zip
CMake-1ab9f4747d2c306cdbc440fb506ba90bc6802250.tar.gz
CMake-1ab9f4747d2c306cdbc440fb506ba90bc6802250.tar.bz2
BUG: Do not report an error removing the binary directory if it doesn't exist.
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx8
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;
}