mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
[FS] Report errors from llvm::sys::fs::rename on Windows
Previously we would always report success, which is pretty bogus. I'm too lazy to write a test where rename will portably fail on all platforms. I'm just trying to fix breakage introduced by r234597, which happened to tickle this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
10d1d8a3bd
commit
6d48bd04aa
@ -261,6 +261,7 @@ std::error_code rename(const Twine &from, const Twine &to) {
|
|||||||
MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING))
|
MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING))
|
||||||
return std::error_code();
|
return std::error_code();
|
||||||
DWORD LastError = ::GetLastError();
|
DWORD LastError = ::GetLastError();
|
||||||
|
ec = windows_error(LastError);
|
||||||
if (LastError != ERROR_ACCESS_DENIED)
|
if (LastError != ERROR_ACCESS_DENIED)
|
||||||
break;
|
break;
|
||||||
// Retry MoveFile() at ACCESS_DENIED.
|
// Retry MoveFile() at ACCESS_DENIED.
|
||||||
|
Loading…
Reference in New Issue
Block a user