diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/archive_read_extract.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libarchive/archive_read_extract.c b/lib/libarchive/archive_read_extract.c index f7127f9..9f1b04c 100644 --- a/lib/libarchive/archive_read_extract.c +++ b/lib/libarchive/archive_read_extract.c @@ -1484,8 +1484,10 @@ set_xattrs(struct archive *a, int fd, struct archive_entry *entry) static int warning_done = 0; (void)a; /* UNUSED */ (void)fd; /* UNUSED */ - (void)entry; /* UNUSED */ - if (!warning_done) { + + /* If there aren't any extended attributes, then it's okay not + * to extract them, otherwise, issue a single warning. */ + if (archive_entry_xattr_count(entry) != 0 && !warning_done) { warning_done = 1; archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, "Cannot restore extended attributes on this system"); |