X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/91dc65a53fbe7dc79a983a51f330033b343cba36..73f2498331782691215bb4cc02fc4431145b7027:/modules/Tool.pm?ds=inline diff --git a/modules/Tool.pm b/modules/Tool.pm index 8d578ef..2d044e0 100644 --- a/modules/Tool.pm +++ b/modules/Tool.pm @@ -6,7 +6,7 @@ package Tool; # Some shared sub routines # # Author: Patrick Canterino -# Last modified: 2004-11-04 +# Last modified: 2004-11-13 # use strict; @@ -64,11 +64,13 @@ sub check_path($$) $first = abs_path($first); $path = $first."/".$last; - $path = File::Spec->canonpath($path); + $first = File::Spec->canonpath($first); + $path = File::Spec->canonpath($path); # Check if the path is above the root directory return if(index($path,$root) == -1); + return if($first eq $root && $last =~ m!^(/|\\)?\.\.(/|\\)?$!); # Create short path name