13
0

Fix "open folder" for non-ASCII paths on Windows

This commit is contained in:
Robin Gareus 2017-11-27 00:42:29 +01:00
parent 7a7fc60a8d
commit 3856d525fb

View File

@ -42,7 +42,9 @@ bool
PBD::open_uri (const char* uri) PBD::open_uri (const char* uri)
{ {
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
ShellExecute(NULL, "open", uri, NULL, NULL, SW_SHOWNORMAL); gunichar2* wuri = g_utf8_to_utf16 (uri, -1, NULL, NULL, NULL);
ShellExecuteW(NULL, L"open", (LPCWSTR)wuri, NULL, NULL, SW_SHOWNORMAL);
g_free (wuri);
return true; return true;
#elif __APPLE__ #elif __APPLE__
return cocoa_open_url (uri); return cocoa_open_url (uri);