Skip Menu |
 

This queue is for tickets about the Archive-Tar CPAN distribution.

Report information
The Basics
Id: 103279
Status: open
Priority: 0/
Queue: Archive-Tar

People
Owner: Nobody in particular
Requestors: paul.kolano [...] nasa.gov
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Archive::Tar strips trailing whitespace from extracted file names
Date: Thu, 2 Apr 2015 13:11:41 -0700
To: <bug-archive-tar [...] rt.cpan.org>
From: Paul Kolano <paul.kolano [...] nasa.gov>
Download (untitled) / with headers
text/plain 902b
Trailing whitespace is stripped from file names during extraction. To reproduce, create tar containing file with trailing whitespace: Show quoted text
> mkdir test > echo foo >test/"space_after " > tar cvf test.tar test
test/ test/space_after Program to extract (a.pl): #!/usr/bin/env perl use Archive::Tar; my $tar = Archive::Tar->new; $tar->read("test.tar"); $tar->extract(); Extract using a.pl: Show quoted text
> a.pl > mv test test.bak > a.pl > diff -r test test.bak
Only in test: space_after Only in test.bak: space_after The extracted "space_after " will be created as "space_after". I believe this can be fixed by changing name from A100 to Z100 in the Archive::Tar::File unpack string. Haven't tested, but A155 prefix field is likely also a problem and possibly uname/gname (OSX can have spaces in group name although not sure if they can be trailing).
Download (untitled) / with headers
text/plain 183b
I opened an issue on the repo: https://github.com/jib/archive-tar-new/issues/10 It will probably help to make a pull-request, although there is an open PR on there that is quite old.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.