mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: version: refine file version process logic
only compare minor version when major equals jira: no-jira Change-Id: I0159c1b15db30238ad05b8ff7c83f6668fd11ac2 (cherry picked from commit e50e6985925582b4b686793244cc88bde3515d07)
This commit is contained in:
@@ -1406,7 +1406,7 @@ int CLI::run(int argc, char **argv)
|
||||
}*/
|
||||
|
||||
Semver cli_ver = *Semver::parse(SoftFever_VERSION);
|
||||
if (!allow_newer_file && ((cli_ver.maj() != file_version.maj()) || (cli_ver.min() < file_version.min()))){
|
||||
if (!allow_newer_file && ((cli_ver.maj() < file_version.maj()) || ((cli_ver.maj() == file_version.maj()) && (cli_ver.min() < file_version.min())))){
|
||||
BOOST_LOG_TRIVIAL(error) << boost::format("Version Check: File Version %1% not supported by current cli version %2%")%file_version.to_string() %SoftFever_VERSION;
|
||||
record_exit_reson(outfile_dir, CLI_FILE_VERSION_NOT_SUPPORTED, 0, cli_errors[CLI_FILE_VERSION_NOT_SUPPORTED], sliced_info);
|
||||
flush_and_exit(CLI_FILE_VERSION_NOT_SUPPORTED);
|
||||
|
||||
@@ -4437,7 +4437,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
// for (ModelVolume *model_volume : model_object->volumes) model_volume->config.reset();
|
||||
// }
|
||||
// }
|
||||
else if (load_config && (file_version > app_version)) {
|
||||
else if (load_config && (file_version.maj() == app_version.maj()) && (file_version.min() > app_version.min())) {
|
||||
if (config_substitutions.unrecogized_keys.size() > 0) {
|
||||
wxString text = wxString::Format(_L("The 3mf's version %s is newer than %s's version %s, found following unrecognized keys:"),
|
||||
file_version.to_string(), std::string(SLIC3R_APP_FULL_NAME), app_version.to_string());
|
||||
|
||||
Reference in New Issue
Block a user