diff options
Diffstat (limited to 'lib/libarchive/archive_write_disk.c')
-rw-r--r-- | lib/libarchive/archive_write_disk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libarchive/archive_write_disk.c b/lib/libarchive/archive_write_disk.c index 7e44613..3fdea0e 100644 --- a/lib/libarchive/archive_write_disk.c +++ b/lib/libarchive/archive_write_disk.c @@ -861,7 +861,11 @@ restore_entry(struct archive_write_disk *a) /* TODO: if it's a symlink... */ - if (a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER) { + /* + * NO_OVERWRITE_NEWER doesn't apply to directories. + */ + if ((a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER) + && !S_ISDIR(a->st.st_mode)) { if (!older(&(a->st), a->entry)) { archive_set_error(&a->archive, 0, "File on disk is not older; skipping."); |