Permalink
Browse files

Do not process HFS+ compression if the file name begins with "._".

  • Loading branch information...
1 parent cfb7792 commit 9cdb89ad46d40873b0923280414bf434c360d6c1 @ggcueroad ggcueroad committed Nov 1, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 libarchive/archive_write_disk_posix.c
@@ -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)

0 comments on commit 9cdb89a

Please sign in to comment.