Skip to content

Commit 50f7722

Browse files
Mask high mode bits in archive reader (#816)
This PR masks the high mode bits when setting file attributes for consistency with mode at file creation. Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
1 parent a4d2510 commit 50f7722

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/ContainerizationArchive/ArchiveReader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ extension ArchiveReader {
398398
}
399399

400400
private func setFileAttributes(fd: Int32, entry: WriteEntry) {
401-
fchmod(fd, entry.permissions)
401+
fchmod(fd, entry.permissions & 0o777)
402402
if let owner = entry.owner, let group = entry.group {
403403
fchown(fd, owner, group)
404404
}

0 commit comments

Comments
 (0)