mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 06:13:45 +01:00
Add automatic restore from backup for sort_order and active_collections for now.
This commit is contained in:
parent
5a24d9155b
commit
40b6c6022a
4 changed files with 36 additions and 15 deletions
|
|
@ -408,19 +408,15 @@ public class ActiveCollections : ISavable, IDisposable
|
|||
public static bool Load(FilenameService fileNames, out JObject ret)
|
||||
{
|
||||
var file = fileNames.ActiveCollectionsFile;
|
||||
if (File.Exists(file))
|
||||
try
|
||||
{
|
||||
ret = JObject.Parse(File.ReadAllText(file));
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Penumbra.Log.Error($"Could not read active collections from file {file}:\n{e}");
|
||||
}
|
||||
var jObj = BackupService.GetJObjectForFile(fileNames, file);
|
||||
if (jObj == null)
|
||||
{
|
||||
ret = new JObject();
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = new JObject();
|
||||
return false;
|
||||
ret = jObj;
|
||||
return true;
|
||||
}
|
||||
|
||||
public string RedundancyCheck(CollectionType type, ActorIdentifier id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue