Browse Source

(verify_volume): Call set_next_block_after
if read_header returns HEADER_FAILURE
Destroy and reinitialize content of current_stat_info and
extended_header after each iteration.
Issue a warning if the archive created contains some members
whose file names were stripped off their leading prefixes.
This is a temporary fix of the issue reported by Bdale Garbee
<[email protected]> (Refs: Debian bug 230064, Message-Id
<[email protected]>, Sun, 15 Feb 2004 11:22:17 -0700)

Sergey Poznyakoff 20 years ago
parent
commit
e563240b95
1 changed files with 11 additions and 0 deletions
  1. 11 0
      src/compare.c

+ 11 - 0
src/compare.c

@@ -494,6 +494,14 @@ diff_archive (void)
 void
 verify_volume (void)
 {
+  if (removed_prefixes_p ())
+    {
+      WARN((0, 0,
+	    _("Archive contains file names with leading prefixes removed.")));
+      WARN((0, 0,
+	    _("Verification may fail to locate original files.")));
+    }
+
   if (!diff_buffer)
     diff_init ();
 
@@ -555,6 +563,7 @@ verify_volume (void)
 	  do
 	    {
 	      counter++;
+	      set_next_block_after (current_header);
 	      status = read_header (false);
 	    }
 	  while (status == HEADER_FAILURE);
@@ -568,6 +577,8 @@ verify_volume (void)
 	break;
 
       diff_archive ();
+      tar_stat_destroy (&current_stat_info);
+      xheader_destroy (&extended_header);
     }
 
   access_mode = ACCESS_WRITE;