bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR impl


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] GNU tar 1.22 creating USTAR not readable by other TAR implementations
Date: Fri, 18 Dec 2009 11:34:51 +0200

Kent Boortz <address@hidden> ha escrit:

> the resulting archive might not unpack correctly using some other TAR
> implementations,

Thanks for reporting. Looks like a bug in directory name splitting
algorithm. Please try the attached patch.

Regards,
Sergey

diff --git a/src/create.c b/src/create.c
index 3add5a0..bdedc0b 100644
--- a/src/create.c
+++ b/src/create.c
@@ -604,6 +604,8 @@ split_long_name (const char *name, size_t length)
 
   if (length > PREFIX_FIELD_SIZE)
     length = PREFIX_FIELD_SIZE + 1;
+  else if (ISSLASH (name[length - 1]))
+    length--;
   for (i = length - 1; i > 0; i--)
     if (ISSLASH (name[i]))
       break;

reply via email to

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