diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-12 22:06:56 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-12 22:06:56 +0000 |
commit | e54b472ffc7e30d97e1f3df8e61a67edf8c2197b (patch) | |
tree | 9eed91ea01c2a4cb3406ce4060deba659e9f08e1 /archival/libunarchive | |
parent | 9a1c71a0f22e7113b87291f874281fb44a455aab (diff) | |
download | busybox-e54b472ffc7e30d97e1f3df8e61a67edf8c2197b.tar.gz |
make tar restore mode again
Diffstat (limited to 'archival/libunarchive')
-rw-r--r-- | archival/libunarchive/data_extract_all.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index 25bf028d2..0bb5bfe33 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c @@ -110,6 +110,14 @@ void data_extract_all(archive_handle_t *archive_handle) if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_OWN)) { lchown(file_header->name, file_header->uid, file_header->gid); } + /* uclibc has no lchmod, glibc is even stranger - + * it has lchmod which seems to do nothing! + * so we use chmod... */ + if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_PERM) + && (file_header->mode & S_IFMT) != S_IFLNK + ) { + chmod(file_header->name, file_header->mode); + } if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) { struct utimbuf t; |