fix sync ftp and ssh

This commit is contained in:
nishiki 2015-01-17 12:01:37 +01:00
parent 298a020e35
commit a49c975f19
4 changed files with 11 additions and 7 deletions
lib/UI

View file

@ -47,15 +47,19 @@ class Cli
end
if @sync.enable
if not @mpw.sync(@sync.get(@passwd), @config.last_update)
if not @mpw.sync(@sync.get(@config.key, @passwd), @config.last_update)
puts "#{I18n.t('display.error')} #2: #{@mpw.error_msg}".red if not @mpw.error_msg.nil?
puts "#{I18n.t('display.error')} #3: #{@sync.error_msg}".red if not @sync.error_msg.nil?
elsif not @sync.update(File.open(@config.file_gpg).read)
puts "#{I18n.t('display.error')} #4: #{@sync.error_msg}".red
elsif not @config.set_last_update
puts "#{I18n.t('display.error')} #5: #{@config.error_msg}".red
elsif not @mpw.encrypt
puts "#{I18n.t('display.error')} #6: #{@mpw.error_msg}".red
else
return true
end