Improve the reliability of file renaming in Windows by having the compiler retry the rename operation on 3 error conditions of ReplaceFileW() that it was previously bailing out on.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Support/Windows/Path.inc | ||
---|---|---|
275 ↗ | (On Diff #49863) | Does ReplaceError need to be declared a DWORD somewhere? I'm not familiar with this code, I could just be missing something. |
lib/Support/Windows/Path.inc | ||
---|---|---|
281 ↗ | (On Diff #51124) | 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. |
Comment Actions
lgtm
lib/Support/Windows/Path.inc | ||
---|---|---|
281 ↗ | (On Diff #51124) | I can agree with that interpretation. :) |