Fix last synced on unlock

This commit is contained in:
Bernd Schoolmann 2023-12-28 14:58:31 +01:00
parent 186c8d777c
commit fa35c3f4aa
No known key found for this signature in database

View File

@ -46,7 +46,6 @@ func DoFullSync(ctx context.Context, vault *vault.Vault, config *config.Config,
return err return err
} }
} else { } else {
vault.SetLastSynced(time.Now().Unix())
log.Info("Sync successful, initializing keyring and vault...") log.Info("Sync successful, initializing keyring and vault...")
} }
@ -63,6 +62,7 @@ func DoFullSync(ctx context.Context, vault *vault.Vault, config *config.Config,
log.Info("Clearing vault...") log.Info("Clearing vault...")
vault.Clear() vault.Clear()
vault.SetLastSynced(time.Now().Unix())
log.Info("Adding %d ciphers to vault...", len(sync.Ciphers)) log.Info("Adding %d ciphers to vault...", len(sync.Ciphers))
for _, cipher := range sync.Ciphers { for _, cipher := range sync.Ciphers {
switch cipher.Type { switch cipher.Type {