Follow-up of 8ae1dfd4d0 -> Fixed build on OsX

This commit is contained in:
Enrico Turri 2019-05-15 10:59:00 +02:00
parent f0acf4f745
commit 64d4e7cd0c

View file

@ -2948,14 +2948,15 @@ const wxString& Plater::priv::get_project_filename() const
void Plater::priv::set_project_filename(const wxString& filename) void Plater::priv::set_project_filename(const wxString& filename)
{ {
wxString copy = filename; std::string copy = into_u8(filename);
if (boost::algorithm::iends_with(copy, ".zip.amf")) if (boost::algorithm::iends_with(copy, ".zip.amf"))
// we remove the .zip part of the extension // we remove the .zip part of the extension
copy = boost::ireplace_last_copy(copy, ".zip.", "."); copy = boost::ireplace_last_copy(copy, ".zip.", ".");
// we force 3mf extension // we force 3mf extension
boost::filesystem::path full_path = into_path(copy); boost::filesystem::path full_path(copy);
full_path.replace_extension("3mf"); if (!full_path.empty())
full_path.replace_extension("3mf");
m_project_filename = from_path(full_path); m_project_filename = from_path(full_path);
wxGetApp().mainframe->update_title(); wxGetApp().mainframe->update_title();