Fix path check to allow for a directory without a trailing /.

(Found in Module::Install 0.59.)
This commit is contained in:
stevenpritchard
2006-03-09 21:21:19 +00:00
parent 2d8d6f8f39
commit 0a4cb1c74b
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -1,5 +1,6 @@
0.61 2006-03-08
* Add this file.
* Add some command-line options:
--filter-requires Specify Requires to remove
@@ -8,4 +9,7 @@
--add-provides Add Provides for this item
--add-buildrequires Add BuildRequires for this item
* Fix path check to allow for a directory without a trailing /.
(Found in Module::Install 0.59.)
# vi: set ai et:
+2 -2
View File
@@ -10,7 +10,7 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: cpanspec,v 1.8 2006/03/09 14:52:15 stevenpritchard Exp $
# $Id: cpanspec,v 1.9 2006/03/09 21:21:19 stevenpritchard Exp $
=head1 NAME
@@ -425,7 +425,7 @@ for my $file (@ARGV) {
my $bogus=0;
for my $entry (list_files($archive, $type)) {
if ($entry !~ /^(?:.\/)?$name-$version\//) {
if ($entry !~ /^(?:.\/)?$name-$version(?:\/|$)/) {
warn "BOGUS PATH DETECTED: $entry\n";
$bogus++;
next;