mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-27 07:33:05 +00:00
fix bug sync when the gpg file doesn't exist
This commit is contained in:
parent
0739be1763
commit
fe973c2fac
1 changed files with 20 additions and 22 deletions
|
@ -273,10 +273,7 @@ module MPW
|
||||||
def sync(data_remote, last_update)
|
def sync(data_remote, last_update)
|
||||||
if !data_remote.instance_of?(Array)
|
if !data_remote.instance_of?(Array)
|
||||||
return false
|
return false
|
||||||
else data_remote.nil? || data_remote.empty?
|
else !data_remote.nil? && !data_remote.empty?
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
@data.each do |l|
|
@data.each do |l|
|
||||||
j = 0
|
j = 0
|
||||||
update = false
|
update = false
|
||||||
|
@ -299,6 +296,7 @@ module MPW
|
||||||
remove(l[ID])
|
remove(l[ID])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Add item
|
# Add item
|
||||||
data_remote.each do |r|
|
data_remote.each do |r|
|
||||||
|
|
Loading…
Reference in a new issue