mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-23 08:17:47 +01:00
fix: handle broken sigs file gracefully
This commit is contained in:
parent
5e31537a0c
commit
1c581d4be3
1 changed files with 11 additions and 1 deletions
|
|
@ -532,7 +532,17 @@ namespace Dalamud.Game
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.textCache = JsonConvert.DeserializeObject<ConcurrentDictionary<string, long>>(File.ReadAllText(this.cacheFile.FullName)) ?? new ConcurrentDictionary<string, long>();
|
try
|
||||||
|
{
|
||||||
|
this.textCache =
|
||||||
|
JsonConvert.DeserializeObject<ConcurrentDictionary<string, long>>(
|
||||||
|
File.ReadAllText(this.cacheFile.FullName)) ?? new ConcurrentDictionary<string, long>();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.textCache = new ConcurrentDictionary<string, long>();
|
||||||
|
Log.Error(ex, "Couldn't load cached sigs");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue