[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] hard links and --transform
From: |
Sergey Poznyakoff |
Subject: |
Re: [Bug-tar] hard links and --transform |
Date: |
Thu, 25 Jun 2009 18:23:36 +0300 |
Jose Miguel Goncalves <address@hidden> ha escrit:
> I'm facing the same problem reported back in March, 17 by Wouter
> Verhelst, regarding storing hard links in tar using --transform.
> I'm using tar 1.22.
I must have overlooked the original report. Please, try the attached
patch. Let me know if it works for you.
Regards,
Sergey
diff --git a/src/create.c b/src/create.c
index a925160..56ea588 100644
--- a/src/create.c
+++ b/src/create.c
@@ -1428,11 +1428,11 @@ file_count_links (struct tar_stat_info *st)
{
struct link *duplicate;
struct link *lp = xmalloc (offsetof (struct link, name)
- + strlen (st->orig_file_name) + 1);
+ + strlen (st->file_name) + 1);
lp->ino = st->stat.st_ino;
lp->dev = st->stat.st_dev;
lp->nlink = st->stat.st_nlink;
- strcpy (lp->name, st->orig_file_name);
+ strcpy (lp->name, st->file_name);
if (! ((link_table
|| (link_table = hash_initialize (0, 0, hash_link,