diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-01-08 23:14:25 -0500 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-01-08 23:14:25 -0500 |
commit | cd9ba88b88522356bdd302c553270337ddc1450e (patch) | |
tree | 0290d692f3df1d67283ca9e49f208594a286a499 /tar/write.c | |
parent | 47b95d1fa9ead3ec98a93aeafe3710518ba5a6b1 (diff) | |
download | libarchive-cd9ba88b88522356bdd302c553270337ddc1450e.tar.gz |
Fix a handling of sparse files in bsdtar.(Not issue 222)
SVN-Revision: 4098
Diffstat (limited to 'tar/write.c')
-rw-r--r-- | tar/write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tar/write.c b/tar/write.c index 9123753a..99d4d78f 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) { |