From: Tim Kientzle Date: Sun, 11 Apr 2010 21:18:09 +0000 (-0400) Subject: If we're not creating the file because of the NEWER test, tell the X-Git-Tag: v3.0.0a~1115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c94df2a2703c10a1b9edc60fe837c0330b8849d4;p=thirdparty%2Flibarchive.git If we're not creating the file because of the NEWER test, tell the writer not to bother sending us the file data. SVN-Revision: 2233 --- diff --git a/libarchive/archive_write_disk.c b/libarchive/archive_write_disk.c index 8a99a2ba1..1890a7eb9 100644 --- a/libarchive/archive_write_disk.c +++ b/libarchive/archive_write_disk.c @@ -1087,6 +1087,7 @@ restore_entry(struct archive_write_disk *a) if ((a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER) && !S_ISDIR(a->st.st_mode)) { if (!older(&(a->st), a->entry)) { + archive_entry_unset_size(a->entry); archive_set_error(&a->archive, 0, "File on disk is not older; skipping."); return (ARCHIVE_FAILED);