Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: felipe [...] felipegasper.com
Cc:
AdminCc:

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



Subject: Archive::Tar doesn’t allow creation of an archive with leading /
Date: Mon, 04 Aug 2014 18:38:33 -0500
To: bug-archive-tar [...] rt.cpan.org
From: Felipe Gasper <felipe [...] felipegasper.com>
Download (untitled) / with headers
text/plain 423b
tar archives are capable of storing “/foo/bar” literally -- i.e., with the leading slash -- but this module always strips out the slash. my $tar_obj = Archive::Tar->new(); $tar_obj->add_data( '/foo', 'my data' ); print Dumper $tar_obj->get_files(); … and you’ll see that the prefix is stored as 'foo', not '/foo'. Even if you twiddle with the ::File object and set ->prefix('/foo'), write() will strip it out.
Download (untitled) / with headers
text/plain 1.2k
On Mon Aug 04 19:38:47 2014, felipe@felipegasper.com wrote: Show quoted text
> tar archives are capable of storing “/foo/bar” literally -- i.e., with > the leading slash -- but this module always strips out the slash. >
When you say "are capable" of storing paths with a "leading slash", are you specifically referring to this (GNUtar) option? ##### $ find /tmp/archive-tar-test/ /tmp/archive-tar-test/ /tmp/archive-tar-test/alpha /tmp/archive-tar-test/alpha/foo /tmp/archive-tar-test/beta $ tar --create --verbose --absolute-names --file ~/Downloads/test_via_tar.tar /tmp/archive-tar-test/ /tmp/archive-tar-test/ /tmp/archive-tar-test/alpha/ /tmp/archive-tar-test/alpha/foo /tmp/archive-tar-test/beta/ $ tar --list --absolute-names --file test_via_tar.tar /tmp/archive-tar-test/ /tmp/archive-tar-test/alpha/ /tmp/archive-tar-test/alpha/foo /tmp/archive-tar-test/beta/ ##### (I found that I had to use the '--absolute-names' option upon both creation and listing.) Show quoted text
> my $tar_obj = Archive::Tar->new(); > $tar_obj->add_data( '/foo', 'my data' ); > print Dumper $tar_obj->get_files(); > > … and you’ll see that the prefix is stored as 'foo', not '/foo'. > > Even if you twiddle with the ::File object and set ->prefix('/foo'), > write() will strip it out.
Subject: Re: [rt.cpan.org #97748] Archive::Tar doesn’t allow creation of an archive with leading /
Date: Thu, 29 Sep 2016 12:05:26 -0400
To: bug-Archive-Tar [...] rt.cpan.org
From: Felipe Gasper <felipe [...] felipegasper.com>
Download (untitled) / with headers
text/plain 1.6k
It’s been a while, but I believe I meant that the format itself is capable of storing the absolute path, so it would be reasonable for Archive::Tar to allow the same. -FG Show quoted text
> On 29 Sep 2016, at 11:47 AM, James E Keenan via RT <bug-Archive-Tar@rt.cpan.org> wrote: > > <URL: https://rt.cpan.org/Ticket/Display.html?id=97748 > > > On Mon Aug 04 19:38:47 2014, felipe@felipegasper.com wrote:
>> tar archives are capable of storing “/foo/bar” literally -- i.e., with >> the leading slash -- but this module always strips out the slash. >>
> > When you say "are capable" of storing paths with a "leading slash", are you specifically referring to this (GNUtar) option? > > ##### > $ find /tmp/archive-tar-test/ > /tmp/archive-tar-test/ > /tmp/archive-tar-test/alpha > /tmp/archive-tar-test/alpha/foo > /tmp/archive-tar-test/beta > > $ tar --create --verbose --absolute-names --file ~/Downloads/test_via_tar.tar /tmp/archive-tar-test/ > /tmp/archive-tar-test/ > /tmp/archive-tar-test/alpha/ > /tmp/archive-tar-test/alpha/foo > /tmp/archive-tar-test/beta/ > > $ tar --list --absolute-names --file test_via_tar.tar > /tmp/archive-tar-test/ > /tmp/archive-tar-test/alpha/ > /tmp/archive-tar-test/alpha/foo > /tmp/archive-tar-test/beta/ > ##### > > (I found that I had to use the '--absolute-names' option upon both creation and listing.) > >
>> my $tar_obj = Archive::Tar->new(); >> $tar_obj->add_data( '/foo', 'my data' ); >> print Dumper $tar_obj->get_files(); >> >> … and you’ll see that the prefix is stored as 'foo', not '/foo'. >> >> Even if you twiddle with the ::File object and set ->prefix('/foo'), >> write() will strip it out.
> > >


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.