Make tarball directory version component optional.

This commit is contained in:
Gavin Carr authored and Steven Pritchard committed 2011-08-31 12:46:21 -05:00
1 parent 84d26ab5af
commit 27e36f6c3d
1 file changed
+2 -2
+2 -2
View File
@@ -696,7 +696,7 @@ for my $file (@args) {
for my $entry (list_files($archive, $type)) { for my $entry (list_files($archive, $type)) {
next if ($type eq 'tar' and $entry eq 'pax_global_header'); next if ($type eq 'tar' and $entry eq 'pax_global_header');
if ($entry !~ /^(?:.\/)?($name-(?:v\.?)?$version)(?:\/|$)/) { if ($entry !~ /^(?:.\/)?($name(?:-(?:v\.?)?$version)?)(?:\/|$)/) {
warn "BOGUS PATH DETECTED: $entry\n"; warn "BOGUS PATH DETECTED: $entry\n";
$bogus++; $bogus++;
next; next;
@@ -704,7 +704,7 @@ for my $file (@args) {
$path=$1; $path=$1;
} }
$entry=~s,^(?:.\/)?$name-(?:v\.?)?$version/,,; $entry =~ s,^(?:.\/)?$name(?:-(?:v\.?)?$version)?/,,;
next if (!$entry); next if (!$entry);
push(@files, $entry); push(@files, $entry);