[PATCH] D17903: Improve reliability of file renaming in Windows

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 09:21:30 PDT 2016


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm


================
Comment at: lib/Support/Windows/Path.inc:281
@@ +280,3 @@
+          ReplaceError == ERROR_UNABLE_TO_MOVE_REPLACEMENT_2) {
+        TryReplace = false;
+        continue;
----------------
dyung wrote:
> We felt that this situation was not possible in this case since we call ReplaceFileW with NULL as the value for lpBackupFileName, so we felt that no backup file would be made. Because of that, if this error occurs, we thought the result would be the same as the ERROR_UNABLE_TO_MOVE_REPLACEMENT, so we would handle it the same way.
I can agree with that interpretation. :)


http://reviews.llvm.org/D17903





More information about the llvm-commits mailing list