mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-08-27 19:36:03 +00:00
Fix interaction between --listed-incremental and -C
* src/incremen.c (read_directory_file): Execute eventual -C dir after opening the snapshot file. (collect_and_sort_names): Remove call to chdir_do * tests/incr05.at, tests/incr06.at: Use relative file names for snapshot files.
This commit is contained in:
@@ -1324,6 +1324,13 @@ read_directory_file (void)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Consume the first name from the name list and reset the
|
||||
list afterwards. This is done to change to the new
|
||||
directory, if the first name is a chdir request (-C dir),
|
||||
which is necessary to recreate absolute file names. */
|
||||
name_from_list ();
|
||||
blank_name_list ();
|
||||
|
||||
if (0 < getline (&buf, &bufsize, listed_incremental_stream))
|
||||
{
|
||||
char *ebuf;
|
||||
|
||||
+1
-1
@@ -903,7 +903,7 @@ collect_and_sort_names (void)
|
||||
_("Only one -C option is allowed with "
|
||||
"--listed-incremental")));
|
||||
}
|
||||
chdir_do (namelist->change_dir);
|
||||
|
||||
read_directory_file ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user