]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Simply, read Mac metadata only when enable_copyfile is true.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 15 Jan 2012 08:08:41 +0000 (03:08 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 15 Jan 2012 08:08:41 +0000 (03:08 -0500)
SVN-Revision: 4153

libarchive/archive_read_disk_entry_from_file.c
libarchive/archive_read_disk_posix.c

index 4d639483cc13ffed831f626c392e8aac079b2811..eef42ef74519abbc46e6cdaf72912448f4622dc9 100644 (file)
@@ -235,9 +235,11 @@ archive_read_disk_entry_from_file(struct archive *_a,
        r1 = setup_xattrs(a, entry, fd);
        if (r1 < r)
                r = r1;
-       r1 = setup_mac_metadata(a, entry, fd);
-       if (r1 < r)
-               r = r1;
+       if (a->enable_copyfile) {
+               r1 = setup_mac_metadata(a, entry, fd);
+               if (r1 < r)
+                       r = r1;
+       }
        r1 = setup_sparse(a, entry, fd);
        if (r1 < r)
                r = r1;
index ea5ce5032763c514e6035f155e6944b8c39d0180..f296bb8cea94efebebef7d0519823cb3b75b476c 100644 (file)
@@ -1058,13 +1058,6 @@ next_entry:
        if (fd >= 0)
                close(fd);
 
-#ifdef __APPLE__
-       if (!a->enable_copyfile) {
-               /* If we aren't using copyfile, drop the copyfile() data. */
-               archive_entry_copy_mac_metadata(entry, NULL, 0);
-       }
-#endif
-
        /* Return to the initial directory. */
        tree_enter_initial_dir(t);
        archive_entry_copy_sourcepath(entry, tree_current_path(t));