We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a116871 commit f62e9f2Copy full SHA for f62e9f2
lib/fileutils.rb
@@ -1487,7 +1487,7 @@ def remove_file(path, force = false)
1487
# Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
1488
#
1489
def remove_dir(path, force = false)
1490
- raise Errno::ENOTDIR, path unless File.directory?(path)
+ raise Errno::ENOTDIR, path unless force or File.directory?(path)
1491
remove_entry path, force
1492
end
1493
module_function :remove_dir
0 commit comments