Merge pull request #1015 from Unnoen/install-file-hash-cache

Utilize hash cache on install.
This commit is contained in:
Timothy Baldridge 2020-08-07 04:16:30 -07:00 committed by GitHub
commit 8fed7ec25f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)