Skip to content

Commit 6bc7796

Browse files
author
Kasper Laudrup
committed
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.
1 parent 5729580 commit 6bc7796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/cmFileCommand.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ bool cmFileCommand::HandleRemove(std::vector<std::string> const& args,
14221422

14231423
if (cmSystemTools::FileIsDirectory(fileName) &&
14241424
!cmSystemTools::FileIsSymlink(fileName) && recurse) {
1425-
cmSystemTools::RemoveADirectory(fileName);
1425+
cmSystemTools::RepeatedRemoveDirectory(fileName);
14261426
} else {
14271427
cmSystemTools::RemoveFile(fileName);
14281428
}

0 commit comments

Comments
 (0)