This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Archive-Tar to CPAN version 1.98
[perl5.git] / cpan / Archive-Tar / bin / ptargrep
index 0367d84..1a320f1 100644 (file)
@@ -68,6 +68,10 @@ sub process_archive {
 sub match_file {
     my($f)   = @_;
     my $path = $f->name;
+    my $prefix = $f->prefix;
+    if (defined $prefix) {
+        $path = File::Spec->catfile($prefix, $path);
+    }
 
     _log("filename: %s  (%d bytes)", $path, $f->size);