mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Update packages
This commit is contained in:
@@ -24,6 +24,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Support for old .NET versions -->
|
||||
<ItemGroup Condition="$(TargetFramework.StartsWith(`net2`))">
|
||||
<PackageReference Include="Net30.LinqBridge" Version="1.3.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`))">
|
||||
<PackageReference Include="MinValueTupleBridge" Version="0.2.1" />
|
||||
</ItemGroup>
|
||||
@@ -38,9 +41,9 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="SabreTools.Hashing" Version="1.4.0" />
|
||||
<PackageReference Include="SabreTools.IO" Version="1.5.0" />
|
||||
<PackageReference Include="SabreTools.Matching" Version="1.4.0" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.5.0" />
|
||||
<PackageReference Include="SabreTools.IO" Version="1.6.1" />
|
||||
<PackageReference Include="SabreTools.Matching" Version="1.5.0" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.5.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using SabreTools.Hashing;
|
||||
using SabreTools.IO.Extensions;
|
||||
using SabreTools.Matching;
|
||||
|
||||
namespace SabreTools.Core.Tools
|
||||
{
|
||||
@@ -18,11 +17,7 @@ namespace SabreTools.Core.Tools
|
||||
public static bool ConditionalHashEquals(byte[]? firstHash, byte[]? secondHash)
|
||||
{
|
||||
// If either hash is empty, we say they're equal for merging
|
||||
#if NET20
|
||||
if (Matching.Extensions.IsNullOrEmpty(firstHash) || Matching.Extensions.IsNullOrEmpty(secondHash))
|
||||
#else
|
||||
if (firstHash.IsNullOrEmpty() || secondHash.IsNullOrEmpty())
|
||||
#endif
|
||||
return true;
|
||||
|
||||
// If they're different sizes, they can't match
|
||||
@@ -58,7 +53,7 @@ namespace SabreTools.Core.Tools
|
||||
/// <returns>Subfolder path for the given hash</returns>
|
||||
public static string? GetDepotPath(byte[]? hash, int depth)
|
||||
{
|
||||
string? sha1 = ByteArrayExtensions.ByteArrayToString(hash);
|
||||
string? sha1 = hash.ToHexString();
|
||||
return GetDepotPath(sha1, depth);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user