mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 03:39:17 +01:00
Fix galaxyAPI::getPathFromDownlinkUrl with Fastly CDN urls
Fastly CDN urls don't contain query strings
This commit is contained in:
parent
b4c6638e19
commit
52b8bdc8fa
@ -567,6 +567,11 @@ std::string galaxyAPI::getPathFromDownlinkUrl(const std::string& downlink_url, c
|
||||
else
|
||||
filename_end_pos = downlink_url_unescaped.find_first_of("?");
|
||||
|
||||
// Downlink doesn't contain "?path=" or "?"
|
||||
// Set end pos to length
|
||||
if (filename_end_pos == std::string::npos)
|
||||
filename_end_pos = downlink_url_unescaped.length();
|
||||
|
||||
if (downlink_url_unescaped.find("/" + gamename + "/") != std::string::npos)
|
||||
{
|
||||
path.assign(downlink_url_unescaped.begin()+downlink_url_unescaped.find("/" + gamename + "/"), downlink_url_unescaped.begin()+filename_end_pos);
|
||||
|
Loading…
Reference in New Issue
Block a user