Kent Boortz <[email protected]> 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;