diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-02-12 22:06:56 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-02-12 22:06:56 +0000 |
commit | ac2036f3cdc4911776c7a7362d84ce4bb8276c36 (patch) | |
tree | 9eed91ea01c2a4cb3406ce4060deba659e9f08e1 | |
parent | cb8cbf98ac14168d3292bbe5ee3431de42c082fc (diff) | |
download | busybox-w32-ac2036f3cdc4911776c7a7362d84ce4bb8276c36.tar.gz busybox-w32-ac2036f3cdc4911776c7a7362d84ce4bb8276c36.tar.bz2 busybox-w32-ac2036f3cdc4911776c7a7362d84ce4bb8276c36.zip |
make tar restore mode again
git-svn-id: svn://busybox.net/trunk/busybox@17869 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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) | |||
110 | if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_OWN)) { | 110 | if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_OWN)) { |
111 | lchown(file_header->name, file_header->uid, file_header->gid); | 111 | lchown(file_header->name, file_header->uid, file_header->gid); |
112 | } | 112 | } |
113 | /* uclibc has no lchmod, glibc is even stranger - | ||
114 | * it has lchmod which seems to do nothing! | ||
115 | * so we use chmod... */ | ||
116 | if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_PERM) | ||
117 | && (file_header->mode & S_IFMT) != S_IFLNK | ||
118 | ) { | ||
119 | chmod(file_header->name, file_header->mode); | ||
120 | } | ||
113 | 121 | ||
114 | if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) { | 122 | if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) { |
115 | struct utimbuf t; | 123 | struct utimbuf t; |