From 3196486ff0a78459e1b88b3847d255a62fd17895 Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 21 Mar 2005 20:37:31 +0000 Subject: [PATCH] fix .. in cmd parser --- perl/DXCommandmode.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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'); -- 2.34.1