Commit dd358a39 authored by James Fargher's avatar James Fargher

Remove incorrect error handling for FileUtils.rm_rf

This function does not return true/false. It eventually calls
`FileUtils.remove_entry` which raises an exception. No exception classes
are documented.
https://ruby-doc.org/stdlib-2.4.1/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry
parent ba518eef
......@@ -267,11 +267,8 @@ module Backup
# delete tmp inside backups
puts_time "Deleting backups/tmp ... ".color(:blue)
if FileUtils.rm_rf(File.join(backup_path, "tmp"))
puts_time "Deleting backups/tmp ... ".color(:blue) + "done".color(:green)
else
puts_time "Deleting backups/tmp failed".color(:red)
end
FileUtils.rm_rf(File.join(backup_path, "tmp"))
puts_time "Deleting backups/tmp ... ".color(:blue) + "done".color(:green)
end
def remove_old
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment