diff options
author | Robin Gareus <robin@gareus.org> | 2017-11-27 00:42:29 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-11-27 00:42:55 +0100 |
commit | 3856d525fbf61463162586ea625208be8e7ebc84 (patch) | |
tree | 1074ad7d9d613e355cf76a96739efdc69c800222 | |
parent | 7a7fc60a8d470fe3eec90ad7cdbb9356666acbe4 (diff) |
Fix "open folder" for non-ASCII paths on Windows
-rw-r--r-- | libs/pbd/openuri.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/pbd/openuri.cc b/libs/pbd/openuri.cc index 0d744ae50d..3ae57d09fb 100644 --- a/libs/pbd/openuri.cc +++ b/libs/pbd/openuri.cc @@ -42,7 +42,9 @@ bool PBD::open_uri (const char* uri) { #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; #elif __APPLE__ return cocoa_open_url (uri); |