]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Do not process HFS+ compression if the file name begins with "._".
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 1 Nov 2012 11:53:57 +0000 (20:53 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 1 Nov 2012 11:53:57 +0000 (20:53 +0900)
libarchive/archive_write_disk_posix.c

index 84e4eb914970122ffeff80120f634f50c697bc89..8cb27f5e70dae7332e04324189d589dd96428d7b 100644 (file)
@@ -562,6 +562,11 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
                a->todo |= TODO_HFS_COMPRESSION;
                a->decmpfs_block_count = (unsigned)-1;
        }
+#ifdef __APPLE__
+       /* Do not compress "._XXX" files. */
+       if (a->name[0] == '.' && a->name[1] == '_')
+               a->todo &= ~TODO_HFS_COMPRESSION;
+#endif
 #endif
 
        if (a->flags & ARCHIVE_EXTRACT_XATTR)