diff options
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r-- | lib/fileutils.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |