浏览代码

(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.

Sergey Poznyakoff 20 年之前
父节点
当前提交
225e690142
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/sparse.c

+ 2 - 0
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;