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

Owner: Nobody in particular
Requestors: paul.kolano [...]

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 [...]>
From: Paul Kolano <paul.kolano [...]>
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 ( #!/usr/bin/env perl use Archive::Tar; my $tar = Archive::Tar->new; $tar->read("test.tar"); $tar->extract(); Extract using Show quoted text
> > mv test test.bak > > 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: 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 infrastructure.

Please report any issues with to