diff options
Diffstat (limited to 'archival/libunarchive/data_extract_all.c')
-rw-r--r-- | archival/libunarchive/data_extract_all.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index d10d665f6..42e442336 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c | |||
@@ -111,8 +111,12 @@ extern void data_extract_all(archive_handle_t *archive_handle) | |||
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | lchown(file_header->name, file_header->uid, file_header->gid); | 114 | if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_OWN)) { |
115 | if ((file_header->mode & S_IFMT) != S_IFLNK) { | 115 | lchown(file_header->name, file_header->uid, file_header->gid); |
116 | } | ||
117 | if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_PERM) && | ||
118 | (file_header->mode & S_IFMT) != S_IFLNK) | ||
119 | { | ||
116 | chmod(file_header->name, file_header->mode); | 120 | chmod(file_header->name, file_header->mode); |
117 | } | 121 | } |
118 | 122 | ||