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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Bytecode/Archive/ArchiveWriter.cpp b/lib/Bytecode/Archive/ArchiveWriter.cpp
index 9d5b025b05..fc85374c02 100644
--- a/lib/Bytecode/Archive/ArchiveWriter.cpp
+++ b/lib/Bytecode/Archive/ArchiveWriter.cpp
@@ -163,7 +163,10 @@ Archive::addFileBefore(const sys::Path& filePath, iterator where,
mbr->data = 0;
mbr->path = filePath;
- if (mbr->path.getFileStatus(mbr->info, false, ErrMsg))
+ const sys::FileStatus *FSInfo = mbr->path.getFileStatus(false, ErrMsg);
+ if (FSInfo)
+ mbr->info = *FSInfo;
+ else
return true;
unsigned flags = 0;