mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
fix(GODT-2387): Ensure vault can be unlocked after factory reset
When performing a factory reset, we don't want to wipe all keychain entries. The only keychain entry should be the vault's passphrase, and we need this to be able to decrypt the vault at next startup (to avoid it being reported as corrupt).
This commit is contained in:
@ -217,14 +217,13 @@ func (l *Locations) getUpdatesPath() string {
|
||||
}
|
||||
|
||||
// Clear removes everything except the lock and update files.
|
||||
func (l *Locations) Clear() error {
|
||||
func (l *Locations) Clear(except ...string) error {
|
||||
return files.Remove(
|
||||
l.userConfig,
|
||||
l.userData,
|
||||
l.userCache,
|
||||
).Except(
|
||||
l.GetGuiLockFile(),
|
||||
l.getUpdatesPath(),
|
||||
append(except, l.GetGuiLockFile(), l.getUpdatesPath())...,
|
||||
).Do()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user