]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix a handling of sparse files in bsdtar.(Not issue 222)
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 9 Jan 2012 04:14:25 +0000 (23:14 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 9 Jan 2012 04:14:25 +0000 (23:14 -0500)
SVN-Revision: 4098

tar/write.c

index 9123753a63d854b8f9b5150f7ee1fc2ec8a154b8..99d4d78f5d62e85ad16e1d0bb5800d944a9aaa58 100644 (file)
@@ -650,8 +650,8 @@ copy_file_data_block(struct bsdtar *bsdtar, struct archive *a,
                if (need_report())
                        report_write(bsdtar, a, entry, progress);
 
-               if (offset < progress) {
-                       int64_t sparse = progress - offset;
+               if (offset > progress) {
+                       int64_t sparse = offset - progress;
                        size_t ns;
 
                        if (null_buff == NULL) {