From: Sergey Poznyakoff Date: Sat, 21 May 2005 23:10:42 +0000 (+0000) Subject: Update invocations of safer_name_suffix() X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=f2c8b1dff36bee31e4d943a409630543977d2db2;p=chaz%2Ftar Update invocations of safer_name_suffix() --- diff --git a/src/buffer.c b/src/buffer.c index 2f6df62..6fc3f43 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -587,7 +587,9 @@ flush_write (void) { if (save_name) { - assign_string (&real_s_name, safer_name_suffix (save_name, false)); + assign_string (&real_s_name, + safer_name_suffix (save_name, false, + absolute_names_option)); real_s_totsize = save_totsize; real_s_sizeleft = save_sizeleft; } @@ -693,7 +695,9 @@ flush_write (void) assign_string (&real_s_name, 0); else { - assign_string (&real_s_name, safer_name_suffix (save_name, false)); + assign_string (&real_s_name, + safer_name_suffix (save_name, false, + absolute_names_option)); real_s_sizeleft = save_sizeleft; real_s_totsize = save_totsize; } @@ -821,7 +825,9 @@ flush_read (void) { if (save_name) { - assign_string (&real_s_name, safer_name_suffix (save_name, false)); + assign_string (&real_s_name, + safer_name_suffix (save_name, false, + absolute_names_option)); real_s_sizeleft = save_sizeleft; real_s_totsize = save_totsize; } diff --git a/src/create.c b/src/create.c index fd5de9e..4edf488 100644 --- a/src/create.c +++ b/src/create.c @@ -1263,7 +1263,8 @@ dump_hard_link (struct tar_stat_info *st) if ((duplicate = hash_lookup (link_table, &lp))) { /* We found a link. */ - char const *link_name = safer_name_suffix (duplicate->name, true); + char const *link_name = safer_name_suffix (duplicate->name, true, + absolute_names_option); duplicate->nlink--; @@ -1361,7 +1362,8 @@ dump_file0 (struct tar_stat_info *st, char *p, return; assign_string (&st->orig_file_name, p); - assign_string (&st->file_name, safer_name_suffix (p, false)); + assign_string (&st->file_name, + safer_name_suffix (p, false, absolute_names_option)); if (deref_stat (dereference_option, p, &st->stat) != 0) { diff --git a/src/extract.c b/src/extract.c index 0f75f26..0e758a2 100644 --- a/src/extract.c +++ b/src/extract.c @@ -778,7 +778,8 @@ extract_file (char *file_name, int typeflag) static int extract_link (char *file_name, int typeflag) { - char const *link_name = safer_name_suffix (current_stat_info.link_name, true); + char const *link_name = safer_name_suffix (current_stat_info.link_name, + true, absolute_names_option); int interdir_made = 0; do @@ -1133,7 +1134,8 @@ extract_archive (void) if (verbose_option) print_header (¤t_stat_info, -1); - file_name = safer_name_suffix (current_stat_info.file_name, false); + file_name = safer_name_suffix (current_stat_info.file_name, + false, absolute_names_option); if (strip_name_components) { size_t prefix_len = stripped_prefix_len (file_name, strip_name_components); diff --git a/src/xheader.c b/src/xheader.c index 679d074..a45d24a 100644 --- a/src/xheader.c +++ b/src/xheader.c @@ -246,7 +246,8 @@ xheader_format_name (struct tar_stat_info *st, const char *fmt, bool allow_n) case 'd': if (st) { - dir = safer_name_suffix (dir_name (st->orig_file_name), false); + dir = safer_name_suffix (dir_name (st->orig_file_name), + false, absolute_names_option); len += strlen (dir) - 1; } break;