diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 256b3ec198..28b69e3e5b 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -963,7 +963,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) this->q->Bind(EVT_UA_AVATAR_SUCCESS, [this](UserAccountSuccessEvent& evt) { boost::filesystem::path path = user_account->get_avatar_path(true); FILE* file; - file = fopen(path.string().c_str(), "wb"); + file = boost::nowide::fopen(path.generic_string().c_str(), "wb"); if (file == NULL) { BOOST_LOG_TRIVIAL(error) << "Failed to create file to store avatar picture at: " << path; return; diff --git a/src/slic3r/GUI/UserAccount.cpp b/src/slic3r/GUI/UserAccount.cpp index 65c9bc40d1..7eff95758c 100644 --- a/src/slic3r/GUI/UserAccount.cpp +++ b/src/slic3r/GUI/UserAccount.cpp @@ -79,7 +79,7 @@ boost::filesystem::path UserAccount::get_avatar_path(bool logged) const { if (logged) { const std::string filename = "prusaslicer-avatar-" + m_instance_hash + m_avatar_extension; - return GUI::into_path(wxStandardPaths::Get().GetTempDir()) / filename; + return into_path(wxStandardPaths::Get().GetTempDir()) / filename; } else { return boost::filesystem::path(resources_dir()) / "icons" / "user.svg"; }