summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-17 04:56:09 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-17 04:56:09 +0000
commit79cfb3d908d49f10fd0c74687fd9759091cce252 (patch)
tree19018a771dbe785c9bae12de87c8fe695140fdab
parentf4562127f643b159862268a526e65c5bd91fdde9 (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--ChangeLog4
-rw-r--r--lib/ftools.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c0fa500827..770e3bd9ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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) != ""