From: Sergey Poznyakoff Date: Thu, 23 Jun 2005 09:10:28 +0000 (+0000) Subject: (sparse_scan_file): Fix another bug, introduced yesterday: Initialize X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=225e690142046de8bb8bf404751948d71bf804d5;p=chaz%2Ftar (sparse_scan_file): Fix another bug, introduced yesterday: Initialize archive_file_size to 0. The variable keeps size of the file *as stored in the archive*, not the size reported by stat. --- diff --git a/src/sparse.c b/src/sparse.c index d3f7164..1d18b20 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -217,6 +217,8 @@ sparse_scan_file (struct tar_sparse_file *file) if (!lseek_or_error (file, 0)) return false; + st->archive_file_size = 0; + if (!tar_sparse_scan (file, scan_begin, NULL)) return false;