diff options
| author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-21 08:59:24 +0000 |
|---|---|---|
| committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-21 08:59:24 +0000 |
| commit | 44b0296735a98e9206c76e1e3513bcdfd98d8914 (patch) | |
| tree | aae69dd96d4e8db2ee966e62c661c1a3efae8654 | |
| parent | 7aa4d5596e7201ef75276322d1509fc326d247c1 (diff) | |
| download | busybox-w32-44b0296735a98e9206c76e1e3513bcdfd98d8914.tar.gz busybox-w32-44b0296735a98e9206c76e1e3513bcdfd98d8914.tar.bz2 busybox-w32-44b0296735a98e9206c76e1e3513bcdfd98d8914.zip | |
Don't hose up perms for files that happen to have symlinks
in the tarball that point to them.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@8151 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | archival/libunarchive/data_extract_all.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index b77cd11ae..4cff24339 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c | |||
| @@ -111,8 +111,10 @@ extern void data_extract_all(archive_handle_t *archive_handle) | |||
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | chown(file_header->name, file_header->uid, file_header->gid); | 114 | lchown(file_header->name, file_header->uid, file_header->gid); |
| 115 | chmod(file_header->name, file_header->mode); | 115 | if ((file_header->mode & S_IFMT) != S_IFLNK) { |
| 116 | chmod(file_header->name, file_header->mode); | ||
| 117 | } | ||
| 116 | 118 | ||
| 117 | if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) { | 119 | if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) { |
| 118 | struct utimbuf t; | 120 | struct utimbuf t; |
