[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] [Fwd: Bug#463251: tar: --transform does not apply to symli
From: |
Sergey Poznyakoff |
Subject: |
Re: [Bug-tar] [Fwd: Bug#463251: tar: --transform does not apply to symlink targets when creating or listing] |
Date: |
Thu, 07 Feb 2008 17:46:56 +0200 |
Bdale Garbee <address@hidden> ha escrit:
> One of the users of my Debian tar packages reports that --transform only
> works on symlinks during extraction, not on creation or listing. A
> quick review of the info doc didn't suggest any reason for that to be
> intentional?
Thanks for reporting. No, it was not intentional. I have installed the
following fix:
Index: src/create.c
===================================================================
RCS file: /cvsroot/tar/tar/src/create.c,v
retrieving revision 1.131
diff -p -u -r1.131 create.c
--- src/create.c 29 Oct 2007 16:56:13 -0000 1.131
+++ src/create.c 7 Feb 2008 15:40:41 -0000
@@ -1706,6 +1706,7 @@ dump_file0 (struct tar_stat_info *st, co
}
buffer[size] = '\0';
assign_string (&st->link_name, buffer);
+ transform_name (&st->link_name);
if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT) < size)
write_long_link (st);
@@ -1714,7 +1715,7 @@ dump_file0 (struct tar_stat_info *st, co
header = start_header (st);
if (!header)
return;
- tar_copy_str (header->header.linkname, buffer, NAME_FIELD_SIZE);
+ tar_copy_str (header->header.linkname, st->link_name, NAME_FIELD_SIZE);
header->header.typeflag = SYMTYPE;
finish_header (st, header, block_ordinal);
/* nothing more to do to it */
Regards,
Sergey