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:
parent
59395ce7db
commit
6e9b4a5087
1 changed files with 4 additions and 1 deletions
|
@ -71,6 +71,7 @@ module MPW
|
||||||
|
|
||||||
if not @remote.to_s.empty?
|
if not @remote.to_s.empty?
|
||||||
@local.list.each do |item|
|
@local.list.each do |item|
|
||||||
|
update = true
|
||||||
@remote.list.each do |r|
|
@remote.list.each do |r|
|
||||||
|
|
||||||
# Update item
|
# Update item
|
||||||
|
@ -88,12 +89,14 @@ module MPW
|
||||||
end
|
end
|
||||||
|
|
||||||
r.delete
|
r.delete
|
||||||
|
update = true
|
||||||
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Remove an old item
|
# 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
|
item.delete
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue