summaryrefslogtreecommitdiff
path: root/lib/File/Basename.pm
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>2000-10-25 03:13:53 +0000
committerbailey <bailey@newman.upenn.edu>2000-10-25 03:13:53 +0000
commite3830a4ec012ee625f1b3bc63b5b18c656f377da (patch)
tree7d45572faf363421532806fe5109c5013c4f786b /lib/File/Basename.pm
parent22d4bb9ccb8701e68f9243547d7e3a3c55f70908 (diff)
downloadperl-e3830a4ec012ee625f1b3bc63b5b18c656f377da.tar.gz
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
Diffstat (limited to 'lib/File/Basename.pm')
-rw-r--r--lib/File/Basename.pm8
1 files changed, 6 insertions, 2 deletions
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;
}