fix for Mac
This commit is contained in:
parent
df42cc8101
commit
f4376273c0
@ -55,8 +55,8 @@ static std::string get_file_path(const wxFont& font) {
|
|||||||
wxString file_uri;
|
wxString file_uri;
|
||||||
wxCFTypeRef(url).GetValue(file_uri);
|
wxCFTypeRef(url).GetValue(file_uri);
|
||||||
std::string file_path(wxURI::Unescape(file_uri).c_str());
|
std::string file_path(wxURI::Unescape(file_uri).c_str());
|
||||||
if (file_path.empty() ||
|
size_t start = std::string("file://").size();
|
||||||
file_path.size() <= std::string_view("file://").size())
|
if (file_path.empty() || file_path.size() <= start)
|
||||||
return {};
|
return {};
|
||||||
// remove prefix file://
|
// remove prefix file://
|
||||||
file_path = file_path.substr(start, file_path.size() - start);
|
file_path = file_path.substr(start, file_path.size() - start);
|
||||||
|
Loading…
Reference in New Issue
Block a user