From: Sergey Poznyakoff Date: Fri, 30 Mar 2007 19:18:24 +0000 (+0000) Subject: (transform_member_name): New function X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=ad85f632c670e8bc7b673c90a4d50da2bff69d09;p=chaz%2Ftar (transform_member_name): New function (decode_header): Use transform_member_name --- diff --git a/src/list.c b/src/list.c index 4bf302e..d6768d9 100644 --- a/src/list.c +++ b/src/list.c @@ -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