mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-07-31 08:42:36 +00:00
Fix --test-label' and --label -r' behavior.
* doc/tar.texi (Including a Label in the Archive): Revise the section. * NEWS: Update * src/buffer.c (open_archive): Check volume label on ACCESS_UPDATE as well. * src/list.c (test_archive_label): Rewrite to match the documentation. * src/names.c (regex_usage_warning): Return int. (names_notfound): Rewrite the conditional. (label_notfound): New function. * tests/label03.at: New testcase. * tests/label04.at: New testcase. * tests/label05.at: New testcase. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise.
This commit is contained in:
+1
-3
@@ -1841,6 +1841,7 @@ open_archive (enum access_mode wanted_access)
|
||||
switch (wanted_access)
|
||||
{
|
||||
case ACCESS_READ:
|
||||
case ACCESS_UPDATE:
|
||||
if (volume_label_option)
|
||||
match_volume_label ();
|
||||
break;
|
||||
@@ -1850,9 +1851,6 @@ open_archive (enum access_mode wanted_access)
|
||||
if (volume_label_option)
|
||||
write_volume_label ();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
set_volume_start_time ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user