]> Dogcows Code - chaz/tar/commitdiff
(transform_member_name): New function
authorSergey Poznyakoff <gray@gnu.org.ua>
Fri, 30 Mar 2007 19:18:24 +0000 (19:18 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Fri, 30 Mar 2007 19:18:24 +0000 (19:18 +0000)
(decode_header): Use transform_member_name

src/list.c

index 4bf302e6d629fbc57726ea9ac071483c009ad3a5..d6768d936687311d3208557e86a457caabc1cede 100644 (file)
@@ -467,9 +467,11 @@ read_header (bool raw_extended_headers)
 }
 
 static char *
-decode_xform (char *file_name)
+decode_xform (char *file_name, void *data)
 {
-  file_name = safer_name_suffix (file_name, false, absolute_names_option);
+  bool link_target = *(bool*)data;
+  file_name = safer_name_suffix (file_name, link_target,
+                                absolute_names_option);
   if (strip_name_components)
     {
       size_t prefix_len = stripped_prefix_len (file_name,
@@ -481,6 +483,12 @@ decode_xform (char *file_name)
   return file_name;
 }
 
+bool
+transform_member_name (char **pinput, bool lnk)
+{
+  return transform_name_fp (pinput, decode_xform, &lnk);
+}
+
 #define ISOCTAL(c) ((c)>='0'&&(c)<='7')
 
 /* Decode things from a file HEADER block into STAT_INFO, also setting
@@ -599,7 +607,7 @@ decode_header (union block *header, struct tar_stat_info *stat_info,
        stat_info->is_dumpdir = true;
     }
 
-  transform_name_fp (&stat_info->file_name, decode_xform);
+  transform_member_name (&stat_info->file_name, false);
 }
 
 /* Convert buffer at WHERE0 of size DIGS from external format to
This page took 0.024182 seconds and 4 git commands to generate.