diff options
author | Charles Bailey <bailey@newman.upenn.edu> | 2000-10-25 03:13:53 +0000 |
---|---|---|
committer | bailey <bailey@newman.upenn.edu> | 2000-10-25 03:13:53 +0000 |
commit | 6a988a413c9d0e6abca3ab868bc36cea62cb1fc1 (patch) | |
tree | 7d45572faf363421532806fe5109c5013c4f786b /lib/File/Path.pm | |
parent | cd07ab055158fbcc2df483a2b06b51771e501aee (diff) | |
download | perl-6a988a413c9d0e6abca3ab868bc36cea62cb1fc1.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/Path.pm')
-rw-r--r-- | lib/File/Path.pm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 46f360a461..ffc856bb59 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -119,16 +119,19 @@ sub mkpath { my(@created,$path); foreach $path (@$paths) { $path .= '/' if $^O eq 'os2' and $path =~ /^\w:\z/s; # feature of CRT - next if -d $path; # Logic wants Unix paths, so go with the flow. - $path = VMS::Filespec::unixify($path) if $Is_VMS; - my $parent = File::Basename::dirname($path); - # Allow for creation of new logical filesystems under VMS - if (not $Is_VMS or $parent !~ m:/[^/]+/000000/?:) { - unless (-d $parent or $path eq $parent) { - push(@created,mkpath($parent, $verbose, $mode)); + if ($Is_VMS) { + next if $path eq '/'; + $path = VMS::Filespec::unixify($path); + if ($path =~ m:^(/[^/]+)/?\z:) { + $path = $1.'/000000'; } } + next if -d $path; + my $parent = File::Basename::dirname($path); + unless (-d $parent or $path eq $parent) { + push(@created,mkpath($parent, $verbose, $mode)); + } print "mkdir $path\n" if $verbose; unless (mkdir($path,$mode)) { my $e = $!; |