Fix non-ASCII path corruption on Windows using from_path() helper (#13036)

This commit is contained in:
SoftFever
2026-03-30 14:51:45 +08:00
committed by GitHub
parent 84408657eb
commit fa67bc87f6
5 changed files with 13 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
#include "HMS.hpp"
#include "GUI.hpp"
#include "DeviceManager.hpp"
#include "DeviceCore/DevManager.h"
#include "DeviceCore/DevUtil.h"
@@ -567,7 +568,7 @@ wxImage HMSQuery::query_image_from_local(const wxString& image_name)
{
const fs::path& image_path = entry.path();
const fs::path& image_name = fs::relative(image_path, local_img_dir);
m_hms_local_images[image_name.string()] = wxImage(wxString::FromUTF8(image_path.string()));
m_hms_local_images[from_path(image_name)] = wxImage(from_path(image_path));
}
}
}