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?
|
||||
@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
|
||||
|
|
Loading…
Reference in a new issue