From dbc63d465574018de759a7737c0926b69e546aa6 Mon Sep 17 00:00:00 2001 From: Martijn Koster Date: Wed, 21 Oct 1998 14:12:03 +0100 Subject: [PATCH] File::Path::mkpath reports the wrong error Message-ID: <19981021131203.A15661@excitecorp.com> p4raw-id: //depot/perl@2069 --- lib/File/Path.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.7.4