diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-17 04:56:09 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-17 04:56:09 +0000 |
commit | 06f82d38838e3d588c96e12bf492b685ff1d8322 (patch) | |
tree | 56e8c2882c208966f5a3c4dcd7d4b8fcf35f2520 | |
parent | 0eb5a42b910728cea4d382867827f4a1b8bbb392 (diff) | |
download | ruby-06f82d38838e3d588c96e12bf492b685ff1d8322.tar.gz |
* lib/ftools.rb (File::makedirs): do not handle "//" as a directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/ftools.rb | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Thu Jul 17 13:42:53 2003 WATANABE Hirofumi <eban@ruby-lang.org> + + * lib/ftools.rb (File::makedirs): do not handle "//" as a directory. + Wed Jul 16 16:23:58 2003 Yukihiro Matsumoto <matz@ruby-lang.org> * eval.c (rb_proc_new): call svalue_to_avalue for yield argument. diff --git a/lib/ftools.rb b/lib/ftools.rb index 6e058a824c..c605bc085e 100644 --- a/lib/ftools.rb +++ b/lib/ftools.rb @@ -131,8 +131,8 @@ class << File # mode = if dirs[-1].is_a? Fixnum then dirs.pop else 0755 end mode = 0755 for dir in dirs - next if FileTest.directory? dir parent = dirname(dir) + next if parent == dir or FileTest.directory? dir makedirs parent unless FileTest.directory? parent $deferr.print "mkdir ", dir, "\n" if verbose if basename(dir) != "" |