]> Dogcows Code - chaz/tar/commitdiff
(verify_volume): Call set_next_block_after
authorSergey Poznyakoff <gray@gnu.org.ua>
Tue, 31 Aug 2004 11:45:55 +0000 (11:45 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Tue, 31 Aug 2004 11:45:55 +0000 (11:45 +0000)
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
<bdale@gag.com> (Refs: Debian bug 230064, Message-Id
<87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)

src/compare.c

index ebcb8c2ba4042cab9f596317e81ee8df65ee598c..b790a7a089e8a9d874f7a99939b5440cc6557cb9 100644 (file)
@@ -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;
This page took 0.02619 seconds and 4 git commands to generate.