Reverting change #27953, as it appears that File::Find has
[p5sagit/p5-mst-13.2.git] / lib / File / Path.pm
index 202bb48..feaefad 100644 (file)
@@ -124,7 +124,7 @@ use Exporter ();
 use strict;
 use warnings;
 
-our $VERSION = "1.07_01";
+our $VERSION = "1.08";
 our @ISA = qw( Exporter );
 our @EXPORT = qw( mkpath rmtree );
 
@@ -161,9 +161,6 @@ sub mkpath {
        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);
@@ -174,7 +171,7 @@ sub mkpath {
        unless (mkdir($path,$mode)) {
            my $e = $!;
            # allow for another process to have created it meanwhile
-           croak ("mkdir $path: $e") unless -d $path;
+           $! = $e, croak ("mkdir $path: $e") unless -d $path;
        }
        push(@created, $path);
     }