]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
If we're not creating the file because of the NEWER test, tell the
authorTim Kientzle <kientzle@gmail.com>
Sun, 11 Apr 2010 21:18:09 +0000 (17:18 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sun, 11 Apr 2010 21:18:09 +0000 (17:18 -0400)
writer not to bother sending us the file data.

SVN-Revision: 2233

libarchive/archive_write_disk.c

index 8a99a2ba1286f269237eff5e93b118c0aa5aedae..1890a7eb96c14246ace9ea027c98dbc848420bd7 100644 (file)
@@ -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);