From: kvr@centrum.cz Date: Tue, 6 Sep 2005 08:07:14 +0000 (-0700) Subject: [perl #37091] File::Path::mkpath resets errno X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=36beb999c4b598c099cb2aaa1524a2a45a9a788b;p=p5sagit%2Fp5-mst-13.2.git [perl #37091] File::Path::mkpath resets errno From: kvr@centrum.cz (via RT) Message-ID: p4raw-id: //depot/perl@25362 --- diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 202bb48..5605735 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -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 ); @@ -174,7 +174,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); }