Bug 365474: Fix "Use of implicit split to @_ is deprecated" warning

r=bear


git-svn-id: svn://10.0.0.236/trunk@217604 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
justdave%bugzilla.org 2007-01-02 17:15:55 +00:00
parent 190de78b0d
commit a2ba25ddf6

View File

@ -1503,14 +1503,14 @@ sub canonpath {
my (@list);
return "" if (!defined($path) || $path eq "");
my $nroot = split('/', $root);
my @nroot = split('/', $root);
$path =~ s@//+@/@g;
foreach my $dir (split('/', $path)) {
if ($dir eq '.') {
next;
} elsif ($dir eq '..') {
pop @list;
return "" if (@list < $nroot);
return "" if (@list < @nroot);
} else {
push @list, $dir;
}