1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-02-20 01:50:04 +00:00

mutliple fixes for sync

This commit is contained in:
nishiki 2016-05-13 15:51:49 +02:00
parent 31751455c5
commit 1399a17c8e

View file

@ -327,7 +327,7 @@ class MPW
sync.connect sync.connect
sync.get(tmp_file) sync.get(tmp_file)
remote = MPW.new(@key, @wallet_file, @gpg_pass) remote = MPW.new(@key, tmp_file, @gpg_pass)
remote.read_data remote.read_data
File.unlink(tmp_file) if File.exist?(tmp_file) File.unlink(tmp_file) if File.exist?(tmp_file)
@ -349,7 +349,7 @@ class MPW
port: r.port, port: r.port,
comment: r.comment comment: r.comment
) )
set_password(item.id, r.get_password(item.id)) set_password(item.id, remote.get_password(item.id))
end end
r.delete r.delete
@ -381,7 +381,7 @@ class MPW
last_edit: r.last_edit last_edit: r.last_edit
) )
set_password(item.id, r.get_password(item.id)) set_password(item.id, remote.get_password(item.id))
add(item) add(item)
end end