Fix zstd library load on Linux

Probably important
This commit is contained in:
PJB3005
2025-08-18 23:53:28 +02:00
parent 7fb3ce0e70
commit 26a1fb35b5

View File

@@ -58,14 +58,14 @@ public static class ZStd
if (OperatingSystem.IsLinux())
{
// Try zstd.so we ship ourselves.
if (NativeLibrary.TryLoad("zstd.so", typeof(Zstd).Assembly, null, out var handle))
if (NativeLibrary.TryLoad("zstd.so", assembly, path, out var handle))
return handle;
// Try some extra paths from the system too worst case.
if (NativeLibrary.TryLoad("libzstd.so.1", out handle))
if (NativeLibrary.TryLoad("libzstd.so.1", assembly, path, out handle))
return handle;
if (NativeLibrary.TryLoad("libzstd.so", out handle))
if (NativeLibrary.TryLoad("libzstd.so", assembly, path, out handle))
return handle;
}
else if (OperatingSystem.IsMacOS())