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 | 79cfb3d908d49f10fd0c74687fd9759091cce252 (patch) | |
tree | 19018a771dbe785c9bae12de87c8fe695140fdab | |
parent | f4562127f643b159862268a526e65c5bd91fdde9 (diff) |
* lib/ftools.rb (File::makedirs): do not handle "//" as a directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@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 9 23:52:13 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net> * regex.c (mbctab_sjis): 0x80 is not shift jis first byte. diff --git a/lib/ftools.rb b/lib/ftools.rb index 6e1c886e56..c99250162f 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 $stderr.print "mkdir ", dir, "\n" if verbose if basename(dir) != "" |