mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 15:37:23 +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
|
|
@ -47,7 +47,7 @@ public class FileCacheManager : IDisposable
|
|||
var hash = splittedEntry[0];
|
||||
var path = splittedEntry[1];
|
||||
var time = splittedEntry[2];
|
||||
FileCaches[path] = new FileCacheEntity(hash, path, time);
|
||||
FileCaches[path] = ReplacePathPrefixes(new FileCacheEntity(hash, path, time));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
@ -112,8 +112,8 @@ public class FileCacheManager : IDisposable
|
|||
|
||||
public FileCacheEntity? GetFileCacheByPath(string path)
|
||||
{
|
||||
var cleanedPath = path.Replace("/", "\\", StringComparison.Ordinal).ToLowerInvariant().Replace(_ipcManager.PenumbraModDirectory()!.ToLowerInvariant(), "", StringComparison.Ordinal);
|
||||
var entry = FileCaches.FirstOrDefault(f => f.Value.ResolvedFilepath.EndsWith(cleanedPath, StringComparison.Ordinal)).Value;
|
||||
var cleanedPath = path.Replace("/", "\\", StringComparison.OrdinalIgnoreCase).ToLowerInvariant().Replace(_ipcManager.PenumbraModDirectory()!.ToLowerInvariant(), "", StringComparison.OrdinalIgnoreCase);
|
||||
var entry = FileCaches.FirstOrDefault(f => f.Value.ResolvedFilepath.EndsWith(cleanedPath, StringComparison.OrdinalIgnoreCase)).Value;
|
||||
|
||||
if (entry == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue