mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 18:37:22 +01:00
add some logging, fix cache handling on load
This commit is contained in:
parent
9ba6827816
commit
5b8e6a3d9f
3 changed files with 22 additions and 8 deletions
|
|
@ -6,7 +6,7 @@ using MareSynchronos.API;
|
|||
using System.Text.RegularExpressions;
|
||||
using MareSynchronos.FileCache;
|
||||
using MareSynchronos.Managers;
|
||||
using System;
|
||||
using MareSynchronos.Utils;
|
||||
|
||||
namespace MareSynchronos.Models;
|
||||
|
||||
|
|
@ -50,15 +50,24 @@ public class FileReplacement
|
|||
if (!IsFileSwap)
|
||||
{
|
||||
var cache = fileDbManager.GetFileCacheByPath(ResolvedPath);
|
||||
if (cache == null) return false;
|
||||
if (cache == null)
|
||||
{
|
||||
Logger.Warn("Replacement Failed verification: " + GamePaths.First());
|
||||
return false;
|
||||
}
|
||||
Hash = cache.Hash;
|
||||
return true;
|
||||
}
|
||||
|
||||
var resolvedPath = fileDbManager.ResolveFileReplacement(GamePaths.First());
|
||||
ResolvedPath = resolvedPath.ToLowerInvariant();
|
||||
ResolvePath(GamePaths.First());
|
||||
|
||||
return IsFileSwap;
|
||||
var success = IsFileSwap;
|
||||
if (!success)
|
||||
{
|
||||
Logger.Warn("FileSwap Failed verification: " + GamePaths.First());
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
public FileReplacementDto ToFileReplacementDto()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue