Removed obselete functions, changed download bars a bit. renamed files correctly
This commit is contained in:
@@ -636,8 +636,7 @@ public sealed class FileCacheManager : IHostedService
|
||||
|
||||
private FileCacheEntity? CreateFileCacheEntity(FileInfo fileInfo, string prefixedPath, string? hash = null)
|
||||
{
|
||||
var algo = Crypto.DetectAlgo(Path.GetFileNameWithoutExtension(fileInfo.Name));
|
||||
hash ??= Crypto.ComputeFileHash(fileInfo.FullName, algo);
|
||||
hash ??= Crypto.ComputeFileHash(fileInfo.FullName, Crypto.HashAlgo.Sha1);
|
||||
var entity = new FileCacheEntity(hash, prefixedPath, fileInfo.LastWriteTimeUtc.Ticks.ToString(CultureInfo.InvariantCulture), fileInfo.Length);
|
||||
entity = ReplacePathPrefixes(entity);
|
||||
AddHashedFile(entity);
|
||||
|
||||
Reference in New Issue
Block a user