mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix potential problem with bad hash caching
This commit is contained in:
parent
971a3ca252
commit
4e631ddd69
@ -276,7 +276,11 @@ namespace Wabbajack.Common
|
||||
|
||||
public static async Task<Hash?> FileHashCachedAsync(this AbsolutePath file)
|
||||
{
|
||||
if (TryGetHashCache(file, out var foundHash)) return foundHash;
|
||||
if (TryGetHashCache(file, out var foundHash))
|
||||
{
|
||||
if (foundHash != default)
|
||||
return foundHash;
|
||||
}
|
||||
|
||||
var hash = await file.FileHashAsync();
|
||||
if (hash != null && hash != Hash.Empty)
|
||||
|
@ -346,6 +346,7 @@ namespace Wabbajack.Lib
|
||||
|
||||
await sourceDir.DeleteDirectory();
|
||||
// Write the expected hash so we ignore compression changes
|
||||
if (bsa.Hash != default)
|
||||
OutputFolder.Combine(bsa.To).FileHashWriteCache(bsa.Hash);
|
||||
|
||||
if (UseCompression)
|
||||
|
Loading…
Reference in New Issue
Block a user