X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fsparse.c;h=aa76c61c2ab232401d533005ae016fcee1bebd04;hb=250db35f17d7700f4d209fd086b7dbc5b7ebe88f;hp=93aee99ed63ae49a3301aa2b4ea17fdff512a6cb;hpb=6f929b2c8998bab44ca81b01cd8e1381fb6e9dfe;p=chaz%2Ftar diff --git a/src/sparse.c b/src/sparse.c index 93aee99..aa76c61 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -945,16 +945,19 @@ pax_dump_header_0 (struct tar_sparse_file *file) file->stat_info->file_name = xheader_format_name (file->stat_info, "%d/GNUSparseFile.%p/%f", 0); - xheader_string_begin (); + xheader_string_begin (&file->stat_info->xhdr); for (i = 0; i < file->stat_info->sparse_map_avail; i++) { if (i) - xheader_string_add (","); - xheader_string_add (umaxtostr (map[i].offset, nbuf)); - xheader_string_add (","); - xheader_string_add (umaxtostr (map[i].numbytes, nbuf)); + xheader_string_add (&file->stat_info->xhdr, ","); + xheader_string_add (&file->stat_info->xhdr, + umaxtostr (map[i].offset, nbuf)); + xheader_string_add (&file->stat_info->xhdr, ","); + xheader_string_add (&file->stat_info->xhdr, + umaxtostr (map[i].numbytes, nbuf)); } - if (!xheader_string_end ("GNU.sparse.map")) + if (!xheader_string_end (&file->stat_info->xhdr, + "GNU.sparse.map")) { free (file->stat_info->file_name); file->stat_info->file_name = save_file_name;