* lib/fileutils.rb (remove_dir): should handle symlink correctly. This patch is contributed by Christian Loew. [ruby-talk:94635]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8818447867
commit
fb9d31c327
@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 10 22:26:25 2004 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* lib/fileutils.rb (remove_dir): should handle symlink correctly.
|
||||||
|
This patch is contributed by Christian Loew. [ruby-talk:94635]
|
||||||
|
|
||||||
Wed Mar 10 16:28:42 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed Mar 10 16:28:42 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (return_jump): set return value to the return
|
* eval.c (return_jump): set return value to the return
|
||||||
|
@ -581,7 +581,9 @@ module FileUtils
|
|||||||
Dir.foreach(dir) do |file|
|
Dir.foreach(dir) do |file|
|
||||||
next if /\A\.\.?\z/ === file
|
next if /\A\.\.?\z/ === file
|
||||||
path = "#{dir}/#{file}"
|
path = "#{dir}/#{file}"
|
||||||
if File.directory?(path)
|
if File.symlink?(path)
|
||||||
|
remove_file path, force
|
||||||
|
elsif File.directory?(path)
|
||||||
remove_dir path, force
|
remove_dir path, force
|
||||||
else
|
else
|
||||||
remove_file path, force
|
remove_file path, force
|
||||||
|
Loading…
x
Reference in New Issue
Block a user