From cb265cdfeee5d4553b6f505ff3b1b6a76d9a2ea5 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Tue, 7 May 2024 09:29:57 +0200 Subject: [PATCH] use boost::nowide::fopen to store avatar --- src/slic3r/GUI/Plater.cpp | 2 +- src/slic3r/GUI/UserAccount.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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"; }