From 46c2cd86104b2699dd6af00c99b515c261e86337 Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Tue, 2 Dec 2003 17:57:33 +0000 Subject: [PATCH] Some cleanings... --- modules/Tool.pm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/Tool.pm b/modules/Tool.pm index 75b9f31..fc1b3b4 100644 --- a/modules/Tool.pm +++ b/modules/Tool.pm @@ -6,7 +6,7 @@ package Tool; # Some shared sub routines # # Author: Patrick Canterino -# Last modified: 2003-10-27 +# Last modified: 2003-12-02 # use strict; @@ -76,7 +76,7 @@ sub check_path($$) my $short_path = substr($path,length($root)); $short_path =~ tr!\\!\/!; - $short_path = "/".$short_path unless($short_path =~ m!^/!); + $short_path = "/".$short_path if($short_path !~ m!^/!); $short_path = $short_path."/" if($short_path !~ m!/$! && -d $path); return ($path,$short_path); @@ -149,12 +149,7 @@ sub file_name($) # upper_path() # -# Truncate a path in one of the following ways: -# -# - If the path points to a directory, the upper directory -# will be returned. -# - If the path points to a file, the directory containing -# the file will be returned. +# Cut the last part of a path away # # Params: Path # -- 2.34.1