8000 * lib/ftools.rb (File::makedirs): do not handle "//" as a directory. · documenting-ruby/ruby@79cfb3d · GitHub
[go: up one dir, main page]

Skip to content

Commit 79cfb3d

Browse files
committed
* 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
1 parent f456212 commit 79cfb3d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Thu Jul 17 13:42:53 2003 WATANABE Hirofumi <eban@ruby-lang.org>
2+
3+
* lib/ftools.rb (File::makedirs): do not handle "//" as a directory.
4+
15
Wed Jul 9 23:52:13 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
26

37
* regex.c (mbctab_sjis): 0x80 is not shift jis first byte.

lib/ftools.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def makedirs(*dirs)
131131
# mode = if dirs[-1].is_a? Fixnum then dirs.pop else 0755 end
132132
mode = 0755
133133
for dir in dirs
134-
next if FileTest.directory? dir
135134
parent = dirname(dir)
135+
next if parent == dir or FileTest.directory? dir
136136
makedirs parent unless FileTest.directory? parent
137137
$stderr.print "mkdir ", dir, "\n" if verbose
138138
if basename(dir) != ""

0 commit comments

Comments
 (0)
0