mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
ENH: add protection for old files
jira: [none] Change-Id: Id1fc3e41a1fa3faf363c902c98a1a2b73820a569 (cherry picked from commit d621bea9382020bc024c4fa070718116de46216c)
This commit is contained in:
@@ -196,9 +196,9 @@ int HMSQuery::load_from_local(const std::string& hms_type, const std::string& de
|
|||||||
{
|
{
|
||||||
const json &j = json::parse(json_file);
|
const json &j = json::parse(json_file);
|
||||||
if (hms_type.compare(QUERY_HMS_INFO) == 0) {
|
if (hms_type.compare(QUERY_HMS_INFO) == 0) {
|
||||||
(*load_json) = j["data"];
|
if (j.contains("data")) { (*load_json) = j["data"]; }
|
||||||
} else if (hms_type.compare(QUERY_HMS_ACTION) == 0) {
|
} else if (hms_type.compare(QUERY_HMS_ACTION) == 0) {
|
||||||
(*load_json)["data"] = j["data"];
|
if (j.contains("data")) { (*load_json)["data"] = j["data"]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j.contains("version")) {
|
if (j.contains("version")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user