native libraries check fix

This commit is contained in:
Timerix 2025-05-21 12:33:57 +05:00
parent 459b3f09f9
commit ab1aefd619

View File

@ -41,15 +41,21 @@ public class LibrariesDownloadTaskFactory : INetworkTaskFactory
bool nativeDirExists = Directory.Exists(_nativesDir);
foreach (var l in _libraries.Libs)
{
if (l is Libraries.NativeLib native)
{
//TODO: replace with actual native libraries check
if(!nativeDirExists || checkHashes)
{
_libsToDownload.Add(l);
}
}
else
{
if (!HashHelper.CheckFileSHA1(l.jarFilePath, l.artifact?.sha1, checkHashes))
{
_libsToDownload.Add(l);
}
//TODO: replace with actual native libraries check
else if (!nativeDirExists && l is Libraries.NativeLib)
{
_libsToDownload.Add(l);
}
}