]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
tar: fix current_block confusion master
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Mar 2024 21:27:32 +0000 (13:27 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Mar 2024 21:28:23 +0000 (13:28 -0800)
Problem reported by Robert Morris in:
https://lists.gnu.org/r/bug-tar/2024-03/msg00001.html
* src/delete.c (flush_file): Simply return at EOF,
so that current_block continues to point to end of input.

src/delete.c

index 4808a27be507379b2cef248215ba96f68c04b94c..8303415fa9f020c1a4bd6bd68293d3f942c9252c 100644 (file)
@@ -149,7 +149,7 @@ flush_file (void)
       flush_archive ();
       if (record_end == current_block)
        /* Hit EOF */
-       break;
+       return;
     }
   current_block += blocks_to_skip;
 }