diff --git a/ChangeLog b/ChangeLog index d4253b0849..8a31f53344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 10 22:26:25 2004 Minero Aoki + + * 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 * eval.c (return_jump): set return value to the return diff --git a/lib/fileutils.rb b/lib/fileutils.rb index c8f29c3d32..b3a1466726 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -581,7 +581,9 @@ module FileUtils Dir.foreach(dir) do |file| next if /\A\.\.?\z/ === file path = "#{dir}/#{file}" - if File.directory?(path) + if File.symlink?(path) + remove_file path, force + elsif File.directory?(path) remove_dir path, force else remove_file path, force