libunarchive: fix a bug where mode and time is no longer restored
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 29 Aug 2009 23:10:17 +0000 (01:10 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 29 Aug 2009 23:18:34 +0000 (01:18 +0200)
Introduced by me in 1.15.x. Found by Rob Landley.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/libunarchive/data_extract_all.c

index 123d1de74866ce00ccfec292eae24af6893268d5..d79ef7cb912bbbb1de8b984d29895fc0fe9dd405 100644 (file)
@@ -132,7 +132,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
 #endif
                        lchown(file_header->name, file_header->uid, file_header->gid);
        }
-       if (S_ISLNK(file_header->mode)) {
+       if (!S_ISLNK(file_header->mode)) {
                /* uclibc has no lchmod, glibc is even stranger -
                 * it has lchmod which seems to do nothing!
                 * so we use chmod... */