Flatten else branch in #unpack

parent 3c67718b
...@@ -136,11 +136,10 @@ module Backup ...@@ -136,11 +136,10 @@ module Backup
exit 1 exit 1
end end
else
# check for existing backups in the backup dir # check for existing backups in the backup dir
if File.exist?(File.join(backup_path, 'backup_information.yml')) elsif File.exist?(File.join(backup_path, 'backup_information.yml'))
progress.puts "Non tarred backup found in #{backup_path}, using that" progress.puts "Non tarred backup found in #{backup_path}, using that"
return false break false
elsif backup_file_list.empty? elsif backup_file_list.empty?
progress.puts "No backups found in #{backup_path}" progress.puts "No backups found in #{backup_path}"
progress.puts "Please make sure that file name ends with #{FILE_NAME_SUFFIX}" progress.puts "Please make sure that file name ends with #{FILE_NAME_SUFFIX}"
...@@ -155,7 +154,6 @@ module Backup ...@@ -155,7 +154,6 @@ module Backup
else else
tar_file = backup_file_list.first tar_file = backup_file_list.first
end end
end
progress.print 'Unpacking backup ... ' progress.print 'Unpacking backup ... '
......
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