bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cpio] Problem with current dir with cpio -H tar


From: Sergey Poznyakoff
Subject: Re: [Bug-cpio] Problem with current dir with cpio -H tar
Date: Thu, 08 Sep 2005 15:50:26 +0300

q# <address@hidden> wrote:

> As you can see, targets CRC, NEWC, ODC, BIN produce correct archives,
> but USTAR and TAR not.

Thank you. The following patch fixes it:

Index: src/util.c
@@ -1273,7 +1272,7 @@ cpio_safer_name_suffix (char *name, bool
                        bool strip_leading_dots)
 {
   char *p = safer_name_suffix (name, link_target, absolute_names);
-  if (strip_leading_dots)
+  if (strip_leading_dots && strcmp (p, "./"))
     /* strip leading `./' from the filename.  */
     while (*p == '.' && *(p + 1) == '/')
       {

Regards,
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]