unescape uri path on MacOs

This commit is contained in:
Filip Sykala - NTB T15p 2023-02-23 16:38:07 +01:00
parent 976ee0c94e
commit 142a21d00e

View File

@ -57,8 +57,9 @@ static std::string get_file_path(const wxFont& font) {
wxCFTypeRef(url).GetValue(file_uri);
wxURI uri(file_uri);
const wxString &path = uri.GetPath();
BOOST_LOG_TRIVIAL(trace) << "input uri(" << file_uri.c_str() << ") convert to path(" << path.c_str() << ").";
return std::string(path.c_str());
std::string path_str(wxURI::Unescape(path).c_str());
BOOST_LOG_TRIVIAL(trace) << "input uri(" << file_uri.c_str() << ") convert to path(" << path.c_str() << ") string(" << path_str << ").";
return path_str;
}
#endif // __APPLE__
} // namespace