diff options
| author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-11 11:08:16 +0000 |
|---|---|---|
| committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-11 11:08:16 +0000 |
| commit | ae62f01e6c454daea76b6128c07d10a4b951c418 (patch) | |
| tree | 3eb83a8357f10070a2cd51b40c1c896b27ecb39f | |
| parent | 5ea6cf9ee13234313e297bf7762ac130f712cf25 (diff) | |
| download | ruby-ae62f01e6c454daea76b6128c07d10a4b951c418.tar.gz ruby-ae62f01e6c454daea76b6128c07d10a4b951c418.tar.xz ruby-ae62f01e6c454daea76b6128c07d10a4b951c418.zip | |
* lib/ftools.rb (makedirs): sync with fileutils.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | lib/ftools.rb | 6 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Thu Dec 11 20:07:01 2003 WATANABE Hirofumi <eban@ruby-lang.org> + + * lib/ftools.rb (makedirs): sync with fileutils. + Thu Dec 11 19:53:03 2003 Minero Aoki <aamine@loveruby.net> * lib/fileutils.rb (mkdir_p): catch all SystemCallErrors. 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 |
