From a37810c0611bc07e14ae1d20852c33eddf41f686 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Sat, 19 Jul 2025 12:33:47 +0200 Subject: [PATCH] fix: Open database crashes on start --- .../flutter_matrix_dart_sdk_database/builder.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart b/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart index a2df2558d..3387fdf38 100644 --- a/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart +++ b/lib/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart @@ -80,12 +80,12 @@ Future _constructDatabase(String clientName) async { final factory = createDatabaseFactoryFfi(ffiInit: SQfLiteEncryptionHelper.ffiInit); - // migrate from potential previous SQLite database path to current one - await _migrateLegacyLocation(path, clientName); - // required for [getDatabasesPath] databaseFactory = factory; + // migrate from potential previous SQLite database path to current one + await _migrateLegacyLocation(path, clientName); + // in case we got a cipher, we use the encryption helper // to manage SQLite encryption final helper = cipher == null