From: minima Date: Mon, 21 Mar 2005 20:37:31 +0000 (+0000) Subject: fix .. in cmd parser X-Git-Tag: R_1_52~76 X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=3196486ff0a78459e1b88b3847d255a62fd17895 fix .. in cmd parser --- diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 95039af6..4dbeb863 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -437,8 +437,9 @@ sub run_cmd $args = "" unless defined $args; if ($cmd) { - # strip out // on command only + # strip out // and .. on command only $cmd =~ s|//|/|g; + $cmd =~ s|\.+|\.|g; my ($path, $fcmd); @@ -454,7 +455,7 @@ sub run_cmd # first expand out the entry to a command ($path, $fcmd) = search($main::localcmd, $cmd, "pl"); - ($path, $fcmd) = search($main::cmd, $cmd, "pl") if !$path || !$fcmd; + ($path, $fcmd) = search($main::cmd, $cmd, "pl") unless $path && $fcmd; if ($path && $cmd) { dbg("path: $cmd cmd: $fcmd") if isdbg('command');