1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-18 21:35:27 -04:00

Fallback to host sqlite3 on FreeBSD and Linux

This commit is contained in:
Bogdan
2025-10-29 12:45:38 +02:00
committed by Mark McDowall
parent 0ff644e842
commit 255f1c37c3
@@ -69,11 +69,19 @@ namespace NzbDrone.Common.Composition
private static IntPtr LoadNativeLib(string libraryName, Assembly assembly, DllImportSearchPath? dllImportSearchPath)
{
ArgumentException.ThrowIfNullOrWhiteSpace(libraryName);
var mappedName = libraryName;
if (OsInfo.IsLinux)
if (libraryName is "sqlite3" or "e_sqlite3")
{
if (libraryName == "sqlite3")
if (OsInfo.IsLinux)
{
if (NativeLibrary.TryLoad(libraryName, assembly, dllImportSearchPath, out var libHandle))
{
return libHandle;
}
mappedName = "libsqlite3.so.0";
}
}