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;
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));