diff --git a/Wabbajack.Common/Hash.cs b/Wabbajack.Common/Hash.cs index 44780108..c961f2fd 100644 --- a/Wabbajack.Common/Hash.cs +++ b/Wabbajack.Common/Hash.cs @@ -276,7 +276,11 @@ namespace Wabbajack.Common public static async Task 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) diff --git a/Wabbajack.Lib/MO2Installer.cs b/Wabbajack.Lib/MO2Installer.cs index 55f478b9..7a7b8b92 100644 --- a/Wabbajack.Lib/MO2Installer.cs +++ b/Wabbajack.Lib/MO2Installer.cs @@ -346,7 +346,8 @@ namespace Wabbajack.Lib await sourceDir.DeleteDirectory(); // Write the expected hash so we ignore compression changes - OutputFolder.Combine(bsa.To).FileHashWriteCache(bsa.Hash); + if (bsa.Hash != default) + OutputFolder.Combine(bsa.To).FileHashWriteCache(bsa.Hash); if (UseCompression) await OutputFolder.Combine(bsa.To).Compact(FileCompaction.Algorithm.XPRESS16K);