On Tue Oct 04 19:15:59 2005, guest wrote:
Show quoted text> There's a bug in Archive::Tar that causes a file like:
>
> foo/foo.txt
>
> to be stored in the tar file as:
>
> foo/.txt
I've tried to reproduce the problem with 1.26, but i've not been able to...
Show quoted text> I've attached a patch that fixes the problem. Not sure if it's a
> catch-all solution, but it works for me.
The patch seems to have been garbled -- its' not plain asci, and looks something like this
to me:
I have applied the following patch, to make sure this issue will not surface (again) and go
uncaught:
==== //member/kane/archive-tar-new/t/04_resolved_issues.t#3 - /Users/kane/sources/
p4/other/archive-tar-new/t/04_resolved_issues.t ====
59a60,99
Show quoted text>
> ### bug #14922
> ### There's a bug in Archive::Tar that causes a file like: foo/foo.txt
> ### to be stored in the tar file as: foo/.txt
> ### XXX could not be reproduced in 1.26 -- leave test to be sure
> { my $dir = $$ . '/';
> my $file = $$ . '.txt';
> my $out = $$ . '.tar';
>
> ### first create the file
> { my $tar = $Class->new;
>
> isa_ok( $tar, $Class );
> ok( $tar->add_data( $dir.$file => $$ ),
> " Added long file" );
>
> ok( $tar->write($out), " File written to $out" );
> }
>
> ### then read it back in
> { my $tar = $Class->new;
> isa_ok( $tar, $Class );
> ok( $tar->read( $out ), " Read in $out again" );
>
> my @files = $tar->get_files;
> is( scalar(@files), 1, " Only 1 entry found" );
>
> my $entry = shift @files;
> ok( $entry->is_file, " Entry is a file" );
> is( $entry->full_path, $dir.$file,
> " With the proper name" );
> }
>
> ### remove the file
> unless( $NO_UNLINK ) { 1 while unlink $out }
> }
>
>
>
>