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 | aaa2313a13e20fca69fbc2a7949185d08fd37242 (patch) | |
| tree | 56e8c2882c208966f5a3c4dcd7d4b8fcf35f2520 | |
| parent | 26ba7f21e62387c432a345a2a4ca84e5318d1ad2 (diff) | |
| download | ruby-aaa2313a13e20fca69fbc2a7949185d08fd37242.tar.gz ruby-aaa2313a13e20fca69fbc2a7949185d08fd37242.tar.xz ruby-aaa2313a13e20fca69fbc2a7949185d08fd37242.zip | |
* lib/ftools.rb (File::makedirs): do not handle "//" as a directory.
git-svn-id: http://svn.ruby-lang.org/repos/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 6e058a824..c605bc085 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) != "" |
