From: pcanterino <> Date: Sat, 23 Jul 2005 16:44:43 +0000 (+0000) Subject: Restored the version of check_path() found in revision 1.34 of Tool.pm X-Git-Tag: version_3_0~9 X-Git-Url: https://git.p6c8.net/devedit.git/commitdiff_plain/5d97440acfd02dd482d9b87d8a86521b013aea46?ds=sidebyside Restored the version of check_path() found in revision 1.34 of Tool.pm --- diff --git a/modules/Tool.pm b/modules/Tool.pm index 3ef4a10..16d5d72 100644 --- a/modules/Tool.pm +++ b/modules/Tool.pm @@ -68,8 +68,9 @@ sub check_path($$) $first = abs_path($first); my $last = file_name($path); + $last = '' if($last eq '.'); - if(-d $first.'/'.$last && (not -l $first.'/'.$last) && -r $first.'/'.$last && -x $first.'/'.$last) + if($last eq '..' || ($^O eq 'MSWin32' && $last =~ m!^\.\.\.+$!)) { $first = abs_path($first.'/'.$last); $last = '';