40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
|
diff --git a/ts/sql/Server.ts b/ts/sql/Server.ts
|
||
|
index 3f941d16e..f1c9c1ba9 100644
|
||
|
--- a/ts/sql/Server.ts
|
||
|
+++ b/ts/sql/Server.ts
|
||
|
@@ -511,7 +511,6 @@ function openAndMigrateDatabase(
|
||
|
let db: Database | undefined;
|
||
|
|
||
|
// First, we try to open the database without any cipher changes
|
||
|
- try {
|
||
|
db = new SQL(filePath, {
|
||
|
readonly,
|
||
|
});
|
||
|
@@ -520,12 +519,6 @@ function openAndMigrateDatabase(
|
||
|
migrateSchemaVersion(db);
|
||
|
|
||
|
return db;
|
||
|
- } catch (error) {
|
||
|
- if (db) {
|
||
|
- db.close();
|
||
|
- }
|
||
|
- logger.info('migrateDatabase: Migration without cipher change failed');
|
||
|
- }
|
||
|
|
||
|
// If that fails, we try to open the database with 3.x compatibility to extract the
|
||
|
// user_version (previously stored in schema_version, blown away by cipher_migrate).
|
||
|
diff --git a/app/main.ts b/app/main.ts
|
||
|
index e46822a85..e48b75549 100644
|
||
|
--- a/app/main.ts
|
||
|
+++ b/app/main.ts
|
||
|
@@ -514,7 +514,7 @@ function handleCommonWindowEvents(
|
||
|
window.webContents.on(
|
||
|
'preload-error',
|
||
|
(_event: Electron.Event, preloadPath: string, error: Error) => {
|
||
|
- getLogger().error(`Preload error in ${preloadPath}: `, error.message);
|
||
|
+ getLogger().error(`Preload error in ${preloadPath}: `, error.message, error.stack, error.code, error, Object.keys(error));
|
||
|
}
|
||
|
);
|
||
|
|
||
|
|