Change regex for invalid path in GalaxyAPI::fileJsonNodeToGameFileVector

Check also for path ending in "/securex" as some games return it for missing files
This commit is contained in:
Sude 2024-05-23 22:38:54 +03:00
parent 61490035bb
commit 266c5817ba

View File

@ -421,8 +421,8 @@ std::vector<gameFile> galaxyAPI::fileJsonNodeToGameFileVector(const std::string&
std::string downlink_url = downlinkJson["downlink"].asString();
std::string path = this->getPathFromDownlinkUrl(downlink_url, gamename);
// Check to see if path ends in "/secure" which means that we got invalid path for some reason
boost::regex path_re("/secure$", boost::regex::perl | boost::regex::icase);
// Check to see if path ends in "/secure" or "/securex" which means that we got invalid path for some reason
boost::regex path_re("/securex?$", boost::regex::perl | boost::regex::icase);
boost::match_results<std::string::const_iterator> what;
if (boost::regex_search(path, what, path_re))
continue;