summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-01-26 11:21:17 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-01-26 11:21:17 +0000
commitdde45d8ef2c2172c2def19cf91865bf36548d0b5 (patch)
treed0b3ff5e0f579a2485474711113834c356987d9a /lib
parent798b63bc924a07589315b3229311582adce06136 (diff)
downloadperl-dde45d8ef2c2172c2def19cf91865bf36548d0b5.tar.gz
Let File::Path report the extended system error message
when available (Ilya Zakharevich) p4raw-id: //depot/perl@30002
Diffstat (limited to 'lib')
-rw-r--r--lib/File/Path.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/File/Path.pm b/lib/File/Path.pm
index 793336e27c..002b9efb20 100644
--- a/lib/File/Path.pm
+++ b/lib/File/Path.pm
@@ -125,7 +125,7 @@ use Exporter ();
use strict;
use warnings;
-our $VERSION = "1.08";
+our $VERSION = "1.09";
our @ISA = qw( Exporter );
our @EXPORT = qw( mkpath rmtree );
@@ -167,10 +167,11 @@ sub mkpath {
my $parent = File::Basename::dirname($path);
unless (-d $parent or $path eq $parent) {
push(@created,mkpath($parent, $verbose, $mode));
- }
+ }
print "mkdir $path\n" if $verbose;
unless (mkdir($path,$mode)) {
- my $e = $!;
+ my ($e, $e1) = ($!, $^E);
+ $e .= "; $e1" if $e ne $e1;
# allow for another process to have created it meanwhile
$! = $e, croak ("mkdir $path: $e") unless -d $path;
}