1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-27 07:33:05 +00:00

fix bug in sync

This commit is contained in:
nishiki 2015-05-11 20:12:23 +02:00
parent 59395ce7db
commit 6e9b4a5087

View file

@ -71,6 +71,7 @@ module MPW
if not @remote.to_s.empty?
@local.list.each do |item|
update = true
@remote.list.each do |r|
# Update item
@ -88,12 +89,14 @@ module MPW
end
r.delete
update = true
break
end
end
# Remove an old item
if item.last_sync.to_i < @config.last_sync and item.last_edit < @config.last_sync
if not update and item.last_sync.to_i < @config.last_sync and item.last_edit < @config.last_sync
item.delete
end
end