]> Dogcows Code - chaz/tar/commitdiff
(extract_link, extract_symlink): Use
authorSergey Poznyakoff <gray@gnu.org.ua>
Fri, 30 Mar 2007 19:18:10 +0000 (19:18 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Fri, 30 Mar 2007 19:18:10 +0000 (19:18 +0000)
transform_member_name instead of safer_name_suffix so that
--transform and --strip-components affect links as well.

src/extract.c

index 387ebb977722d64b4fa5776cac3fff7bfa7e9696..b0127f2840610983cafcab74a352579feadf7b02 100644 (file)
@@ -914,10 +914,12 @@ create_placeholder_file (char *file_name, bool is_symlink, int *interdir_made)
 static int
 extract_link (char *file_name, int typeflag)
 {
-  char const *link_name = safer_name_suffix (current_stat_info.link_name,
-                                             true, absolute_names_option);
   int interdir_made = 0;
+  char const *link_name;
 
+  transform_member_name (&current_stat_info.link_name, true);
+  link_name = current_stat_info.link_name;
+  
   if (! absolute_names_option && contains_dot_dot (link_name))
     return create_placeholder_file (file_name, false, &interdir_made);
 
@@ -972,6 +974,8 @@ extract_symlink (char *file_name, int typeflag)
   int status;
   int interdir_made = 0;
 
+  transform_member_name (&current_stat_info.link_name, true);
+
   if (! absolute_names_option
       && (IS_ABSOLUTE_FILE_NAME (current_stat_info.link_name)
          || contains_dot_dot (current_stat_info.link_name)))
This page took 0.025373 seconds and 4 git commands to generate.