Provide better feedback during hashing

This commit is contained in:
Timothy Baldridge 2020-05-16 15:27:23 -06:00
parent 436029e0f2
commit 68a05a011d
2 changed files with 3 additions and 2 deletions

View File

@ -225,7 +225,8 @@ namespace Wabbajack.Common
{
await using var fs = file.OpenRead();
var config = new xxHashConfig {HashSizeInBits = 64};
var value = await xxHashFactory.Instance.Create(config).ComputeHashAsync(fs);
await using var hs = new StatusFileStream(fs, $"Hashing {file}");
var value = await xxHashFactory.Instance.Create(config).ComputeHashAsync(hs);
return new Hash(BitConverter.ToUInt64(value.Hash));
}
catch (IOException)

View File

@ -298,7 +298,7 @@ namespace Wabbajack.Lib
.Where(e => e.Extension != Consts.HashFileExtension)
.ToList();
Utils.Log($"Found {toHash} files to hash");
Utils.Log($"Found {toHash.Count} files to hash");
var hashResults = await
toHash