mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-21 03:52:15 -07:00
FIX: CLI: fix the stl name not correct issue when using export-stl
jira: no-jira Change-Id: I5cd83c9fb787416d5045470025fa96696d8bfab9 (cherry picked from commit 49b1568877345b1eb9bdfacac19d451569433f3f)
This commit is contained in:
parent
6b16ac1fcd
commit
5e4a2f3bc1
1 changed files with 2 additions and 2 deletions
|
|
@ -6739,8 +6739,8 @@ std::string CLI::output_filepath(const ModelObject &object, unsigned int index,
|
|||
// use --outputdir when available
|
||||
file_name = object.name.empty()?object.input_file:object.name;
|
||||
file_name = "obj_"+std::to_string(index)+"_"+file_name;
|
||||
size_t pos = file_name.find_last_of(ext), ext_pos = file_name.size() - 1;
|
||||
if (pos != ext_pos)
|
||||
size_t pos = file_name.rfind(ext), ext_pos = file_name.size() - ext.size();
|
||||
if ((pos == std::string::npos) || (pos != ext_pos))
|
||||
file_name += ext;
|
||||
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": dir = "<< path_dir<<", file_name="<<file_name<< ", pos = "<<pos<<", ext_pos="<<ext_pos;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue