From: Sergey Poznyakoff Date: Fri, 30 Mar 2007 19:18:10 +0000 (+0000) Subject: (extract_link, extract_symlink): Use X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=062b37115f4ab2bbdc72a128807adbb010291f8c;p=chaz%2Ftar (extract_link, extract_symlink): Use transform_member_name instead of safer_name_suffix so that --transform and --strip-components affect links as well. --- diff --git a/src/extract.c b/src/extract.c index 387ebb9..b0127f2 100644 --- a/src/extract.c +++ b/src/extract.c @@ -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 (¤t_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 (¤t_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)))