Page MenuHomePhabricator

[Support][Windows] Prevent 2s delay when renaming a file that does not exist

Authored by bd1976llvm on Jun 25 2020, 5:15 AM.

Diff Detail

Event Timeline

bd1976llvm created this revision.Jun 25 2020, 5:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2020, 5:15 AM
amccarth edited reviewers, added: amccarth; removed: rnk.Jun 25 2020, 11:27 AM

rnk is on leave, so I'll jump in.

This is correct, but I have a small suggestion inline to make it more robust against future changes.


I would probably just return the error here rather than break.

When you break, you end up calling GetLastError() again. While that's probably safe, a small future change could end perturb that last error code.

Addressed review comments.

bd1976llvm marked 2 inline comments as done.Jun 30 2020, 3:40 AM
bd1976llvm added inline comments.

Clearly better. Thanks.

amccarth accepted this revision.Jun 30 2020, 9:16 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Jun 30 2020, 9:16 AM
This revision was automatically updated to reflect the committed changes.