diff options
-rw-r--r-- | lib/File/Path.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 09c52a4e1b..225ecab4b6 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); } |