From ae62f01e6c454daea76b6128c07d10a4b951c418 Mon Sep 17 00:00:00 2001 From: eban Date: Thu, 11 Dec 2003 11:08:16 +0000 Subject: * lib/ftools.rb (makedirs): sync with fileutils. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/ftools.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ftools.rb b/lib/ftools.rb index c605bc085..0c6182b58 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 -- cgit