Fix the effect of --transform over hard link targets without the --absolute-names
* src/create.c (file_count_links): Apply safer_name_suffix to the hard link name prior to transforming it. * tests/xform03.at: New test case. * tests/Makefile.am: Add xform03.at * tests/testsuite.at: Likewise.
This commit is contained in:
@@ -1534,7 +1534,8 @@ file_count_links (struct tar_stat_info *st)
|
||||
char *linkname = NULL;
|
||||
struct link *lp;
|
||||
|
||||
assign_string (&linkname, st->orig_file_name);
|
||||
assign_string (&linkname, safer_name_suffix (st->orig_file_name, true,
|
||||
absolute_names_option));
|
||||
transform_name (&linkname, XFORM_LINK);
|
||||
|
||||
lp = xmalloc (offsetof (struct link, name)
|
||||
|
||||
Reference in New Issue
Block a user