projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8251ff8
)
Allow concurrent mkdir in File::Path::mkpath
author
Ruben Schattevoy
<schattev@imb-jena.de>
Thu, 7 Aug 1997 00:00:00 +0000
(
00:00
+0000)
committer
Tim Bunce
<Tim.Bunce@ig.co.uk>
Wed, 6 Aug 1997 12:00:00 +0000
(
00:00
+1200)
private-msgid:
199707300943
.LAA21574@kant.imb-jena.de
lib/File/Path.pm
patch
|
blob
|
history
diff --git
a/lib/File/Path.pm
b/lib/File/Path.pm
index
fe56ae5
..
43856df
100644
(file)
--- a/
lib/File/Path.pm
+++ b/
lib/File/Path.pm
@@
-130,7
+130,10
@@
sub mkpath {
my $parent = File::Basename::dirname($path);
push(@created,mkpath($parent, $verbose, $mode)) unless (-d $parent);
print "mkdir $path\n" if $verbose;
- mkdir($path,$mode) || croak "mkdir $path: $!";
+ unless (mkdir($path,$mode)) {
+ # allow for another process to have created it meanwhile
+ croak "mkdir $path: $!" unless -d $path;
+ }
push(@created, $path);
}
@created;