svn commit: trunk/busybox/archival/libunarchive
vda at busybox.net
vda at busybox.net
Mon Feb 12 14:06:58 PST 2007
Author: vda
Date: 2007-02-12 14:06:56 -0800 (Mon, 12 Feb 2007)
New Revision: 17869
Log:
make tar restore mode again
Modified:
trunk/busybox/archival/libunarchive/data_extract_all.c
Changeset:
Modified: trunk/busybox/archival/libunarchive/data_extract_all.c
===================================================================
--- trunk/busybox/archival/libunarchive/data_extract_all.c 2007-02-12 21:57:57 UTC (rev 17868)
+++ trunk/busybox/archival/libunarchive/data_extract_all.c 2007-02-12 22:06:56 UTC (rev 17869)
@@ -110,6 +110,14 @@
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;
More information about the busybox-cvs
mailing list