From 00ecafe3d57955bf4bcb70ba6f8d35faf90b54df Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 12 Feb 2020 14:23:54 +0100 Subject: [PATCH] #3650 - Fixed extension of exported file when processing models for sla printers from command line --- src/libslic3r/PrintBase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/PrintBase.cpp b/src/libslic3r/PrintBase.cpp index 55e24178de..812e060c6d 100644 --- a/src/libslic3r/PrintBase.cpp +++ b/src/libslic3r/PrintBase.cpp @@ -64,8 +64,8 @@ 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()) - filename = boost::filesystem::change_extension(filename, default_ext); + if (filename.extension().string() != default_ext) + filename = boost::filesystem::change_extension(filename, default_ext); return filename.string(); } catch (std::runtime_error &err) { throw std::runtime_error(L("Failed processing of the output_filename_format template.") + "\n" + err.what());