From 225e690142046de8bb8bf404751948d71bf804d5 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 23 Jun 2005 09:10:28 +0000 Subject: [PATCH] (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. --- src/sparse.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.44.0