From: Martijn Koster Date: Wed, 21 Oct 1998 13:12:03 +0000 (+0100) Subject: File::Path::mkpath reports the wrong error X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dbc63d465574018de759a7737c0926b69e546aa6;p=p5sagit%2Fp5-mst-13.2.git File::Path::mkpath reports the wrong error Message-ID: <19981021131203.A15661@excitecorp.com> p4raw-id: //depot/perl@2069 --- diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 09c52a4..225ecab 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -135,8 +135,9 @@ sub mkpath { } print "mkdir $path\n" if $verbose; unless (mkdir($path,$mode)) { - # allow for another process to have created it meanwhile - croak "mkdir $path: $!" unless -d $path; + my $e = $!; + # allow for another process to have created it meanwhile + croak "mkdir $path: $e" unless -d $path; } push(@created, $path); }