Subject: | Busybox support ($Archive::Tar::ZERO_PAD_NUMBERS for checksum) broken |
Archive::tar claims "compatibility with C<busybox> implementations".
But $Archive::Tar::ZERO_PAD_NUMBERS is ignored for the checksum.
Patch (not tested):
--- a/Tar.pm 2015-06-18
+++ b/Tar.pm 2015-06-18
@@ -1454,8 +1454,8 @@
);
### add the checksum ###
- my $checksum_fmt = $ZERO_PAD_NUMBERS ? "%06o\0" : "%06o\0";
- substr($tar,148,7) = sprintf("%6o\0", unpack("%16C*",$tar));
+ my $checksum_fmt = $ZERO_PAD_NUMBERS ? "%06o\0" : "%6o\0";
+ substr($tar,148,7) = sprintf($checksum_fmt, unpack("%16C*",$tar));
return $tar;
}