mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Improve error handling on corrupt indexer config files (#624)
This commit is contained in:
@@ -46,10 +46,10 @@ namespace Jackett.Services
|
|||||||
var configFilePath = GetIndexerConfigFilePath(idx);
|
var configFilePath = GetIndexerConfigFilePath(idx);
|
||||||
if (File.Exists(configFilePath))
|
if (File.Exists(configFilePath))
|
||||||
{
|
{
|
||||||
var fileStr = File.ReadAllText(configFilePath);
|
|
||||||
var jsonString = JToken.Parse(fileStr);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var fileStr = File.ReadAllText(configFilePath);
|
||||||
|
var jsonString = JToken.Parse(fileStr);
|
||||||
idx.LoadFromSavedConfiguration(jsonString);
|
idx.LoadFromSavedConfiguration(jsonString);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
Reference in New Issue
Block a user