Utilize hash cache on install.

This commit is contained in:
Unnoen 2020-08-07 18:29:12 +10:00
parent aaa2275032
commit a4254af3c9
No known key found for this signature in database
GPG Key ID: F370906A9D954C50
2 changed files with 10 additions and 1 deletions

View File

@ -202,6 +202,10 @@ namespace Wabbajack.Common
bw.Write((ulong)hash);
_hashCache.Put(Encoding.UTF8.GetBytes(file.Normalize()), ms.ToArray());
}
public static void FileHashWriteCache(this AbsolutePath file, Hash hash)
{
WriteHashCache(file, hash);
}
public static async Task<Hash> FileHashCachedAsync(this AbsolutePath file, bool nullOnIOError = false)
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
@ -228,6 +228,11 @@ namespace Wabbajack.Lib
}
}
foreach (var file in group)
{
file.To.RelativeTo(OutputFolder).FileHashWriteCache(file.Hash);
}
if (UseCompression)
{
foreach (var file in group)