Retry removing directories on Windows

On Windows removing a directory can fail if other processes have a
handle to it. This has been "solved" with a retry hack when moving
directories, so use the same hack when removing directories.
This commit is contained in:
Kasper Laudrup
2019-08-08 15:30:17 +02:00
parent 5729580376
commit 6bc77966ad

View File

@@ -1422,7 +1422,7 @@ bool cmFileCommand::HandleRemove(std::vector<std::string> const& args,
if (cmSystemTools::FileIsDirectory(fileName) &&
!cmSystemTools::FileIsSymlink(fileName) && recurse) {
cmSystemTools::RemoveADirectory(fileName);
cmSystemTools::RepeatedRemoveDirectory(fileName);
} else {
cmSystemTools::RemoveFile(fileName);
}