mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its users correspondingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -496,7 +496,8 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
|
||||
arch.close();
|
||||
|
||||
// Move the final file over top of TmpArchive
|
||||
FinalFilePath.renamePathOnDisk(TmpArchive);
|
||||
if (FinalFilePath.renamePathOnDisk(TmpArchive, error))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Before we replace the actual archive, we need to forget all the
|
||||
@ -504,7 +505,8 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
|
||||
// this because we cannot replace an open file on Windows.
|
||||
cleanUpMemory();
|
||||
|
||||
TmpArchive.renamePathOnDisk(archPath);
|
||||
if (TmpArchive.renamePathOnDisk(archPath, error))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user