]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix: process directory entries even when mac extensions are turned off
authorTim Kientzle <kientzle@acm.org>
Sun, 23 Feb 2014 17:16:34 +0000 (09:16 -0800)
committerTim Kientzle <kientzle@acm.org>
Sun, 23 Feb 2014 17:16:34 +0000 (09:16 -0800)
libarchive/archive_read_support_format_zip.c

index 254299faea3f232c22dfc6903ee422d3afa79c82..9b5f0eecb0a97d365e9f0114238a25012052ad73 100644 (file)
@@ -1833,7 +1833,11 @@ slurp_central_directory(struct archive_read *a, struct zip *zip)
                 * "__MACOSX/" directory, so we should check if
                 * it is.
                 */
-               if (zip->process_mac_extensions) {
+               if (!zip->process_mac_extensions) {
+                       /* Treat every entry as a regular entry. */
+                       __archive_rb_tree_insert_node(&zip->tree,
+                           &zip_entry->node);
+               } else {
                        name = p;
                        r = rsrc_basename(name, filename_length);
                        if (filename_length >= 9 &&