aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
-rw-r--r--llvm/tools/llvm-objcopy/llvm-objcopy.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
index db5609e..d04b1cf 100644
--- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
+++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
@@ -215,7 +215,8 @@ static Error restoreStatOnFile(StringRef Filename,
FD, Stat.getLastAccessedTime(), Stat.getLastModificationTime()))
return createFileError(Filename, EC);
- if (auto EC = sys::fs::setPermissions(Filename, Stat.permissions()))
+ if (auto EC = sys::fs::setPermissions(Filename, Stat.permissions(),
+ /*respectUmask=*/true))
return createFileError(Filename, EC);
if (auto EC = sys::Process::SafelyCloseFileDescriptor(FD))