mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 20:07:21 +01:00
fix some performance issues
This commit is contained in:
parent
7e87dc61e7
commit
90a25c23dc
5 changed files with 25 additions and 9 deletions
|
|
@ -7,6 +7,7 @@ using System.Text.RegularExpressions;
|
|||
using MareSynchronos.FileCache;
|
||||
using MareSynchronos.Managers;
|
||||
using MareSynchronos.Utils;
|
||||
using System;
|
||||
|
||||
namespace MareSynchronos.Models;
|
||||
|
||||
|
|
@ -40,8 +41,16 @@ public class FileReplacement
|
|||
|
||||
_ = Task.Run(() =>
|
||||
{
|
||||
var cache = fileDbManager.GetFileCacheByPath(ResolvedPath)!;
|
||||
Hash = cache.Hash;
|
||||
try
|
||||
{
|
||||
var cache = fileDbManager.GetFileCacheByPath(ResolvedPath)!;
|
||||
Hash = cache.Hash;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Warn("Could not set Hash for " + ResolvedPath + ", resetting to original");
|
||||
ResolvedPath = GamePaths.First();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue