summaryrefslogtreecommitdiff
path: root/lib/File/Path.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/File/Path.pm')
-rw-r--r--lib/File/Path.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/File/Path.pm b/lib/File/Path.pm
index 6b5d5683f1..39f1ba1771 100644
--- a/lib/File/Path.pm
+++ b/lib/File/Path.pm
@@ -124,11 +124,15 @@ sub mkpath {
$paths = [$paths] unless ref $paths;
my(@created,$path);
foreach $path (@$paths) {
+ $path .= '/' if $^O eq 'os2' and $path =~ /^\w:$/; # 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);
- push(@created,mkpath($parent, $verbose, $mode)) unless (-d $parent);
+ # Allow for creation of new logical filesystems under VMS
+ if (not $Is_VMS or $parent !~ m:/[^/]+/000000/?:) {
+ push(@created,mkpath($parent, $verbose, $mode)) unless (-d $parent);
+ }
print "mkdir $path\n" if $verbose;
unless (mkdir($path,$mode)) {
# allow for another process to have created it meanwhile