Revert "Enable plain text encryption early if we actually mean to use basic_text as backend"

This commit is contained in:
R Midhun Suresh
2025-05-23 12:24:47 +05:30
committed by GitHub
parent 73ddf2a19b
commit a85b7a2d58

View File

@@ -350,6 +350,12 @@ class Store extends ElectronStore<StoreData> {
await clearDataAndRelaunch();
}
}
// We do not check allowPlaintextStorage here as it was already checked above if the storage is new
// and if the storage is existing then we should continue to honour the backend used to write the data
if (safeStorageBackend === "basic_text" && selectedSafeStorageBackend === safeStorageBackend) {
safeStorage.setUsePlainTextEncryption(true);
}
} else if (!safeStorageBackend) {
safeStorageBackend = this.mode === Mode.Encrypted ? "system" : "plaintext";
this.recordSafeStorageBackend(safeStorageBackend);