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
commit06f82d38838e3d588c96e12bf492b685ff1d8322 (patch)
tree56e8c2882c208966f5a3c4dcd7d4b8fcf35f2520
parent0eb5a42b910728cea4d382867827f4a1b8bbb392 (diff)
* 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--ChangeLog4
-rw-r--r--lib/ftools.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c6c9bb7be..92a107768e 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 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) != ""