mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-13 14:44:15 +01:00
fix cleanup of outdated files in filescanner
This commit is contained in:
parent
605c1d3774
commit
14e5b5bb21
3 changed files with 9 additions and 3 deletions
|
|
@ -197,12 +197,13 @@ public class FileCacheManager : IDisposable
|
|||
|
||||
public void RemoveHash(FileCacheEntity entity)
|
||||
{
|
||||
FileCaches.Remove(entity.Hash, out _);
|
||||
Logger.Verbose("Removing " + entity.ResolvedFilepath);
|
||||
FileCaches.Remove(entity.PrefixedFilePath, out _);
|
||||
}
|
||||
|
||||
public void UpdateHash(FileCacheEntity fileCache)
|
||||
{
|
||||
Logger.Debug("Updating hash for " + fileCache.ResolvedFilepath);
|
||||
Logger.Verbose("Updating hash for " + fileCache.ResolvedFilepath);
|
||||
fileCache.Hash = Crypto.GetFileHash(fileCache.ResolvedFilepath);
|
||||
fileCache.LastModifiedDateTicks = new FileInfo(fileCache.ResolvedFilepath).LastWriteTimeUtc.Ticks.ToString(CultureInfo.InvariantCulture);
|
||||
FileCaches.Remove(fileCache.PrefixedFilePath, out _);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue