This commit is contained in:
David Baker 2025-06-04 16:23:59 +01:00
parent 2e039f4bab
commit 86f6136257
2 changed files with 3 additions and 3 deletions

View File

@ -487,7 +487,7 @@ app.on("ready", async () => {
try {
console.debug("Ensuring storage is ready");
if (!await store.prepareSafeStorage(global.mainWindow.webContents.session)) return;
if (!(await store.prepareSafeStorage(global.mainWindow.webContents.session))) return;
} catch (e) {
console.error(e);
app.exit(1);

View File

@ -276,9 +276,9 @@ class Store extends ElectronStore<StoreData> {
* Prepare the safeStorage backend for use.
* We don't eagerly import from keytar as that would bring in data for all Element profiles and not just the current one,
* so we import lazily in getSecret.
*
*
* This will relaunch the app in some cases, in which case it will return false and the caller should abort startup.
*
*
* @param electronSession - The Electron session to use for storage (will be used to clear storage if necessary).
* @returns true if safeStorage was initialised successfully or false if the app will be relaunched
*/