#3650 - Fixed extension of exported file when processing models for sla printers from command line

This commit is contained in:
Enrico Turri 2020-02-12 14:23:54 +01:00
parent e70b17f38c
commit 00ecafe3d5

View File

@ -64,7 +64,7 @@ std::string PrintBase::output_filename(const std::string &format, const std::str
boost::filesystem::path filename = format.empty() ?
cfg.opt_string("input_filename_base") + default_ext :
this->placeholder_parser().process(format, 0, &cfg);
if (filename.extension().empty())
if (filename.extension().string() != default_ext)
filename = boost::filesystem::change_extension(filename, default_ext);
return filename.string();
} catch (std::runtime_error &err) {