Make tarball directory version component optional.

This commit is contained in:
Gavin Carr
2011-08-31 12:46:21 -05:00
committed by Steven Pritchard
parent 84d26ab5af
commit 27e36f6c3d
+2 -2
View File
@@ -696,7 +696,7 @@ for my $file (@args) {
for my $entry (list_files($archive, $type)) {
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";
$bogus++;
next;
@@ -704,7 +704,7 @@ for my $file (@args) {
$path=$1;
}
$entry=~s,^(?:.\/)?$name-(?:v\.?)?$version/,,;
$entry =~ s,^(?:.\/)?$name(?:-(?:v\.?)?$version)?/,,;
next if (!$entry);
push(@files, $entry);