diff options
author | Owen Anderson <resistor@mac.com> | 2008-05-24 05:42:29 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-05-24 05:42:29 +0000 |
commit | 3f4ebba1fa8fc6fd26e71d4f3df2deec81cb15fb (patch) | |
tree | 1a28f6bc4f232f9c1ff913242e698570ae7720d6 | |
parent | 65d18feef53c6e0149ccc3854beacc59ace1751d (diff) | |
download | llvm-3f4ebba1fa8fc6fd26e71d4f3df2deec81cb15fb.zip llvm-3f4ebba1fa8fc6fd26e71d4f3df2deec81cb15fb.tar.gz llvm-3f4ebba1fa8fc6fd26e71d4f3df2deec81cb15fb.tar.bz2 |
Create archives with the same permissions are ar.
Patch by Mikael Lepistö.
llvm-svn: 51540
-rw-r--r-- | llvm/lib/Archive/ArchiveWriter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Archive/ArchiveWriter.cpp b/llvm/lib/Archive/ArchiveWriter.cpp index c5d54fb..2269464 100644 --- a/llvm/lib/Archive/ArchiveWriter.cpp +++ b/llvm/lib/Archive/ArchiveWriter.cpp @@ -467,5 +467,12 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress, if (TmpArchive.renamePathOnDisk(archPath, ErrMsg)) return true; + // Set correct read and write permissions after temporary file is moved + // to final destination path. + if (archPath.makeReadableOnDisk(ErrMsg)) + return true; + if (archPath.makeWriteableOnDisk(ErrMsg)) + return true; + return false; } |