fix(windows): Make sure we look at the correct path when searching the sqlite3 dll

Took 23 minutes
onboarding
MTRNord 4 years ago
parent f8a1f77a64
commit 488fdfef2c

@ -77,8 +77,9 @@ Future<Database> 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);
}

Loading…
Cancel
Save