Make tarball directory version component optional.
This commit is contained in:
1 parent
84d26ab5af
commit
27e36f6c3d
1 file changed
+2
-2
@@ -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);
|
||||||
|
|||||||
Reference in new issue
Block a user