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:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user