X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/8b44ea28c7eb989926e06b0fd8b861e13af05a26..258ec0b29f3b69680b6de4ddc9704c3710a50178:/modules/Tool.pm diff --git a/modules/Tool.pm b/modules/Tool.pm index a37967e..9e89e43 100644 --- a/modules/Tool.pm +++ b/modules/Tool.pm @@ -6,7 +6,7 @@ package Tool; # Some shared sub routines # # Author: Patrick Canterino -# Last modified: 10-03-2003 +# Last modified: 2003-10-03 # use strict; @@ -14,7 +14,6 @@ use strict; use vars qw(@EXPORT); use Cwd qw(abs_path); -use File::Basename; use File::Spec; ### Export ### @@ -54,17 +53,11 @@ sub check_path($$) # The path points to a file # We have to extract the directory name and create the absolute path - my @pathinfo = fileparse($path); + my $dir = upper_path($path); + my $file = file_name($path); - # This is only to avoid errors - - my $basename = $pathinfo[0] || ''; - my $dir = $pathinfo[1] || ''; - my $ext = $pathinfo[2] || ''; - - $dir = abs_path($dir); - - $path = $dir."/".$basename.$ext; + $dir = abs_path($dir); + $path = $dir."/".$file; } else {