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/Sync

View file

@ -50,7 +50,7 @@ module MPW
# Get data on server
# @args: gpg_password -> the gpg password
# @rtrn: nil if nothing data or error
def get(gpg_password)
def get(gpg_key, gpg_password)
return nil if not @enable
tmp_file = tmpfile
@ -59,7 +59,7 @@ module MPW
ftp.gettextfile(@path, tmp_file)
end
mpw = MPW.new(tmp_file)
mpw = MPW.new(tmp_file, gpg_key)
if not mpw.decrypt(gpg_password)
@error_msg = mpw.error_msg
return nil