From 488fdfef2c4b06c4ab1183ffe1075a7e2b0de1da 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 30a2a75b7..89e2e91ef 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); }