mirror of
https://github.com/edubart/otclient.git
synced 2025-04-30 17:49:21 +02:00
Fix opening "https://"-prefixed links on Windows (#1160)
This commit is contained in:
parent
302748b2f3
commit
10100342b9
@ -148,7 +148,7 @@ ticks_t Platform::getFileModificationTime(std::string file)
|
|||||||
|
|
||||||
void Platform::openUrl(std::string url)
|
void Platform::openUrl(std::string url)
|
||||||
{
|
{
|
||||||
if(url.find("http://") == std::string::npos)
|
if(url.find("http://") == std::string::npos && url.find("https://") == std::string::npos)
|
||||||
url.insert(0, "http://");
|
url.insert(0, "http://");
|
||||||
ShellExecuteW(NULL, L"open", stdext::utf8_to_utf16(url).c_str(), NULL, NULL, SW_SHOWNORMAL);
|
ShellExecuteW(NULL, L"open", stdext::utf8_to_utf16(url).c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user