From e3830a4ec012ee625f1b3bc63b5b18c656f377da Mon Sep 17 00:00:00 2001 From: Charles Bailey Date: Wed, 25 Oct 2000 03:13:53 +0000 Subject: Cleanup from prior patch (Charles Lane?): - improve handling of MFDs in Basename and Path - default to no xsubpp line # munging when building debug images p4raw-id: //depot/vmsperl@7430 --- lib/File/Basename.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/File/Basename.pm') diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index 4581e7e93c..243234403a 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -189,9 +189,13 @@ sub fileparse { } elsif ($fstype !~ /^VMS/i) { # default to Unix ($dirpath,$basename) = ($fullname =~ m#^(.*/)?(.*)#s); - if ($^O eq 'VMS' and $fullname =~ m:/[^/]+/000000/?:) { + if ($^O eq 'VMS' and $fullname =~ m:^(/[^/]+/000000(/|$))(.*):) { # dev:[000000] is top of VMS tree, similar to Unix '/' - ($basename,$dirpath) = ('',$fullname); + # so strip it off and treat the rest as "normal" + my $devspec = $1; + my $remainder = $3; + ($dirpath,$basename) = ($remainder =~ m#^(.*/)?(.*)#s); + $dirpath = $devspec.$dirpath; } $dirpath = './' unless $dirpath; } -- cgit v1.2.1