]> dxcluster.org Git - spider.git/commitdiff
fix .. in cmd parser
authorminima <minima>
Mon, 21 Mar 2005 20:37:31 +0000 (20:37 +0000)
committerminima <minima>
Mon, 21 Mar 2005 20:37:31 +0000 (20:37 +0000)
perl/DXCommandmode.pm

index 95039af60ef5ef477ddc77333660a246610c830a..4dbeb863c8ba784f8ee3b264eb4e507cfc4d0e5f 100644 (file)
@@ -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');