Some more work on mod merging/splitting, still WIP.

This commit is contained in:
Ottermandias 2023-05-09 20:19:12 +02:00
parent b50564f741
commit 5d96f789fe
4 changed files with 126 additions and 49 deletions

View file

@ -15,7 +15,7 @@ public class DuplicateManager
{
private readonly SaveService _saveService;
private readonly ModManager _modManager;
private readonly SHA256 _hasher = SHA256.Create();
private readonly SHA256 _hasher = SHA256.Create();
private readonly List<(FullPath[] Paths, long Size, byte[] Hash)> _duplicates = new();
public DuplicateManager(ModManager modManager, SaveService saveService)
@ -175,7 +175,8 @@ public class DuplicateManager
}
}
private static unsafe bool CompareFilesDirectly(FullPath f1, FullPath f2)
/// <summary> Check if two files are identical on a binary level. Returns true if they are identical. </summary>
public static unsafe bool CompareFilesDirectly(FullPath f1, FullPath f2)
{
if (!f1.Exists || !f2.Exists)
return false;