aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Archive/ArchiveWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode/Archive/ArchiveWriter.cpp')
-rw-r--r--lib/Bytecode/Archive/ArchiveWriter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Bytecode/Archive/ArchiveWriter.cpp b/lib/Bytecode/Archive/ArchiveWriter.cpp
index c3fda5fe1a..86da17cc77 100644
--- a/lib/Bytecode/Archive/ArchiveWriter.cpp
+++ b/lib/Bytecode/Archive/ArchiveWriter.cpp
@@ -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;
}