diff options
-rw-r--r-- | lib/File/Basename.pm | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index 279503680a..4581e7e93c 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -236,14 +236,7 @@ sub dirname { if ($_[0] =~ m#/#) { $fstype = '' } else { return $dirname || $ENV{DEFAULT} } } - if ($fstype =~ /MacOS/i) { - $dirname =~ s/([^:]):\z/$1/s; - unless( length($basename) ) { - local($File::Basename::Fileparse_fstype) = $fstype; - ($basename,$dirname) = fileparse $dirname; - $dirname =~ s/([^:]):\z/$1/s; - } - } + if ($fstype =~ /MacOS/i) { return $dirname } elsif ($fstype =~ /MSDOS/i) { $dirname =~ s/([^:])[\\\/]*\z/$1/; unless( length($basename) ) { |