mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-15 04:08:09 +08:00
#3650 - Fixed extension of exported file when processing models for sla printers from command line
This commit is contained in:
parent
e70b17f38c
commit
00ecafe3d5
@ -64,8 +64,8 @@ std::string PrintBase::output_filename(const std::string &format, const std::str
|
|||||||
boost::filesystem::path filename = format.empty() ?
|
boost::filesystem::path filename = format.empty() ?
|
||||||
cfg.opt_string("input_filename_base") + default_ext :
|
cfg.opt_string("input_filename_base") + default_ext :
|
||||||
this->placeholder_parser().process(format, 0, &cfg);
|
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);
|
filename = boost::filesystem::change_extension(filename, default_ext);
|
||||||
return filename.string();
|
return filename.string();
|
||||||
} catch (std::runtime_error &err) {
|
} catch (std::runtime_error &err) {
|
||||||
throw std::runtime_error(L("Failed processing of the output_filename_format template.") + "\n" + err.what());
|
throw std::runtime_error(L("Failed processing of the output_filename_format template.") + "\n" + err.what());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user