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:
parent
190de78b0d
commit
a2ba25ddf6
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user