summaryrefslogtreecommitdiff
path: root/lib/ftools.rb
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-11 11:08:16 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-11 11:08:16 +0000
commit50e61c533bbf4b62c0144bfcd13f627c8fe9e95e (patch)
tree3eb83a8357f10070a2cd51b40c1c896b27ecb39f /lib/ftools.rb
parent5c3abcd043dca3794d68757a34640cb0ea9502b1 (diff)
* lib/ftools.rb (makedirs): sync with fileutils.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/ftools.rb')
-rw-r--r--lib/ftools.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ftools.rb b/lib/ftools.rb
index c605bc085e..0c6182b58b 100644
--- a/lib/ftools.rb
+++ b/lib/ftools.rb
@@ -136,7 +136,11 @@ class << File
makedirs parent unless FileTest.directory? parent
$deferr.print "mkdir ", dir, "\n" if verbose
if basename(dir) != ""
- Dir.mkdir dir, mode
+ begin
+ Dir.mkdir dir, mode
+ rescue SystemCallError
+ raise unless File.directory? dir
+ end
end
end
end