Galaxy: Workaround for file name issue

This commit is contained in:
Sude 2017-10-18 13:19:25 +03:00
parent 3f8a8d6b68
commit 8191b9d0a3

View File

@ -410,6 +410,16 @@ std::vector<gameFile> galaxyAPI::fileJsonNodeToGameFileVector(const std::string&
path = "/" + gamename + "/" + path;
}
// Workaround for filename issue caused by different (currently unknown) url formatting scheme
// https://github.com/Sude-/lgogdownloader/issues/126
if (path.find("?") != std::string::npos)
{
if (path.find_last_of("?") > path.find_last_of("/"))
{
path.assign(path.begin(), path.begin()+path.find_last_of("?"));
}
}
gameFile gf;
gf.gamename = gamename;
gf.type = type;