From: Michihiro NAKAJIMA Date: Mon, 9 Jan 2012 04:14:25 +0000 (-0500) Subject: Fix a handling of sparse files in bsdtar.(Not issue 222) X-Git-Tag: v3.0.4~2^2~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd9ba88b88522356bdd302c553270337ddc1450e;p=thirdparty%2Flibarchive.git Fix a handling of sparse files in bsdtar.(Not issue 222) SVN-Revision: 4098 --- diff --git a/tar/write.c b/tar/write.c index 9123753a6..99d4d78f5 100644 --- a/tar/write.c +++ b/tar/write.c @@ -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) {