From: Michihiro NAKAJIMA Date: Thu, 1 Nov 2012 11:53:57 +0000 (+0900) Subject: Do not process HFS+ compression if the file name begins with "._". X-Git-Tag: v3.1.0~39^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cdb89ad46d40873b0923280414bf434c360d6c1;p=thirdparty%2Flibarchive.git Do not process HFS+ compression if the file name begins with "._". --- diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c index 84e4eb914..8cb27f5e7 100644 --- a/libarchive/archive_write_disk_posix.c +++ b/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)