BUG: Do not report an error removing the binary directory if it doesn't exist.

This commit is contained in:
Brad King 2005-03-11 12:56:10 -05:00
parent a1de574851
commit 1ab9f4747d

View File

@ -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 true;
}