From 986c03e45f0c41f3ecd13a58724c1a1b76d000a3 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Thu, 22 Oct 2020 12:08:11 +0200 Subject: [PATCH] fix(windows): Make sure we look at the correct path when searching the sqlite3 dll Took 23 minutes --- lib/utils/database/mobile.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils/database/mobile.dart b/lib/utils/database/mobile.dart index 30a2a75b..89e2e91e 100644 --- a/lib/utils/database/mobile.dart +++ b/lib/utils/database/mobile.dart @@ -77,8 +77,9 @@ Future constructDb( } DynamicLibrary _openOnWindows() { - final script = File(Platform.script.toFilePath()); - final libraryNextToScript = File('${script.path}/sqlite3.dll'); + final exe_path = File( + Platform.resolvedExecutable.replaceAll(RegExp(r'fluffychat.exe'), '')); + final libraryNextToScript = File('${exe_path.path}/sqlite3.dll'); return DynamicLibrary.open(libraryNextToScript.path); }