fix: Issue opening files that contain special characters on Linux

This is a (hopefully temporary) hack. Fixes #568
This commit is contained in:
WerWolv
2022-07-06 11:29:24 +02:00
parent b401059678
commit 31a746f3fc
3 changed files with 26 additions and 1 deletions

View File

@@ -245,6 +245,19 @@ namespace hex {
return {};
}
std::string Net::decode(const std::string &input) {
auto unescapedString = curl_easy_unescape(this->m_ctx, input.c_str(), std::strlen(input.c_str()), nullptr);
if (unescapedString != nullptr) {
std::string output = unescapedString;
curl_free(unescapedString);
return output;
}
return {};
}
std::string Net::s_proxyUrl;
void Net::setProxy(const std::string &url) {