diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index b00d4843e6..3220ce07d4 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -2251,7 +2251,7 @@ void GLGizmoEmboss::store_font_list_to_app_config() std::string GLGizmoEmboss::get_file_name(const std::string &file_path) { - size_t pos_last_delimiter = file_path.find_last_of('\\'); + size_t pos_last_delimiter = file_path.find_last_of("/\\"); size_t pos_point = file_path.find_last_of('.'); size_t offset = pos_last_delimiter + 1; size_t count = pos_point - pos_last_delimiter - 1; diff --git a/src/slic3r/Utils/FontManager.cpp b/src/slic3r/Utils/FontManager.cpp index 09c6ea5fa0..47ca3dbb88 100644 --- a/src/slic3r/Utils/FontManager.cpp +++ b/src/slic3r/Utils/FontManager.cpp @@ -106,7 +106,7 @@ bool FontManager::load_font(size_t font_index, const wxFont &font) static std::string get_file_name(const std::string &file_path) { - size_t pos_last_delimiter = file_path.find_last_of('\\'); + size_t pos_last_delimiter = file_path.find_last_of("/\\"); size_t pos_point = file_path.find_last_of('.'); size_t offset = pos_last_delimiter + 1; size_t count = pos_point - pos_last_delimiter - 1;