Force SHA1 hashing on updated hash files
This commit is contained in:
@@ -449,13 +449,12 @@ public sealed class FileCacheManager : IHostedService
|
||||
_logger.LogTrace("Updating hash for {path}", fileCache.ResolvedFilepath);
|
||||
var oldHash = fileCache.Hash;
|
||||
var prefixedPath = fileCache.PrefixedFilePath;
|
||||
var algo = Crypto.DetectAlgo(fileCache.ResolvedFilepath);
|
||||
if (computeProperties)
|
||||
{
|
||||
var fi = new FileInfo(fileCache.ResolvedFilepath);
|
||||
fileCache.Size = fi.Length;
|
||||
fileCache.CompressedSize = null;
|
||||
fileCache.Hash = Crypto.ComputeFileHash(fileCache.ResolvedFilepath, algo);
|
||||
fileCache.Hash = Crypto.ComputeFileHash(fileCache.ResolvedFilepath, Crypto.HashAlgo.Sha1);
|
||||
fileCache.LastModifiedDateTicks = fi.LastWriteTimeUtc.Ticks.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
RemoveHashedFile(oldHash, prefixedPath);
|
||||
|
||||
Reference in New Issue
Block a user