mirror of
https://github.com/BernardoGiordano/Checkpoint
synced 2024-11-28 11:30:22 +00:00
Fix #218
This commit is contained in:
parent
92e595dd70
commit
80cfaeb9e0
2 changed files with 14 additions and 14 deletions
|
@ -66,12 +66,12 @@ Configuration::Configuration(void)
|
|||
mJson["favorites"] = nlohmann::json::array();
|
||||
updateJson = true;
|
||||
}
|
||||
if (!(mJson.contains("additional_save_folders") && mJson["additional_save_folders"].is_array())) {
|
||||
mJson["additional_save_folders"] = nlohmann::json::array();
|
||||
if (!(mJson.contains("additional_save_folders") && mJson["additional_save_folders"].is_object())) {
|
||||
mJson["additional_save_folders"] = nlohmann::json::object();
|
||||
updateJson = true;
|
||||
}
|
||||
if (!(mJson.contains("additional_extdata_folders") && mJson["additional_extdata_folders"].is_array())) {
|
||||
mJson["additional_extdata_folders"] = nlohmann::json::array();
|
||||
if (!(mJson.contains("additional_extdata_folders") && mJson["additional_extdata_folders"].is_object())) {
|
||||
mJson["additional_extdata_folders"] = nlohmann::json::object();
|
||||
updateJson = true;
|
||||
}
|
||||
// check every single entry in the arrays...
|
||||
|
@ -90,15 +90,15 @@ Configuration::Configuration(void)
|
|||
}
|
||||
}
|
||||
for (auto& obj : mJson["additional_save_folders"]) {
|
||||
if (!obj.is_string()) {
|
||||
mJson["additional_save_folders"] = nlohmann::json::array();
|
||||
if (!obj.is_object()) {
|
||||
mJson["additional_save_folders"] = nlohmann::json::object();
|
||||
updateJson = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (auto& obj : mJson["additional_extdata_folders"]) {
|
||||
if (!obj.is_string()) {
|
||||
mJson["additional_extdata_folders"] = nlohmann::json::array();
|
||||
if (!obj.is_object()) {
|
||||
mJson["additional_extdata_folders"] = nlohmann::json::object();
|
||||
updateJson = true;
|
||||
break;
|
||||
}
|
||||
|
@ -210,4 +210,4 @@ std::vector<std::u16string> Configuration::additionalExtdataFolders(u64 id)
|
|||
bool Configuration::shouldScanCard(void)
|
||||
{
|
||||
return mScanCard;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,8 +121,8 @@ Configuration::Configuration(void)
|
|||
mJson["favorites"] = nlohmann::json::array();
|
||||
updateJson = true;
|
||||
}
|
||||
if (!(mJson.contains("additional_save_folders") && mJson["additional_save_folders"].is_array())) {
|
||||
mJson["additional_save_folders"] = nlohmann::json::array();
|
||||
if (!(mJson.contains("additional_save_folders") && mJson["additional_save_folders"].is_object())) {
|
||||
mJson["additional_save_folders"] = nlohmann::json::object();
|
||||
updateJson = true;
|
||||
}
|
||||
// check every single entry in the arrays...
|
||||
|
@ -141,8 +141,8 @@ Configuration::Configuration(void)
|
|||
}
|
||||
}
|
||||
for (auto& obj : mJson["additional_save_folders"]) {
|
||||
if (!obj.is_string()) {
|
||||
mJson["additional_save_folders"] = nlohmann::json::array();
|
||||
if (!obj.is_object()) {
|
||||
mJson["additional_save_folders"] = nlohmann::json::object();
|
||||
updateJson = true;
|
||||
break;
|
||||
}
|
||||
|
@ -285,4 +285,4 @@ nlohmann::json Configuration::getJson(void)
|
|||
bool Configuration::isFTPEnabled(void)
|
||||
{
|
||||
return FTPEnabled;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue