mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
Check that product id selection was successful in Downloader::downloadFileWithId
Fixes possible issue where downloader tries to get product info even though it failed to get valid product id beforehand
This commit is contained in:
parent
d6c226c5d7
commit
4997a45597
@ -2384,14 +2384,13 @@ int Downloader::downloadFileWithId(const std::string& fileid_string, const std::
|
||||
fileid.assign(fileid_string.begin()+pos+1, fileid_string.end());
|
||||
|
||||
std::string product_id;
|
||||
if(this->galaxySelectProductIdHelper(gamename, product_id))
|
||||
{
|
||||
if (product_id.empty())
|
||||
bool bSelectOK = this->galaxySelectProductIdHelper(gamename, product_id);
|
||||
|
||||
if (!bSelectOK || product_id.empty())
|
||||
{
|
||||
std::cerr << "Failed to get numerical product id" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Json::Value productInfo = gogGalaxy->getProductInfo(product_id);
|
||||
if (productInfo.empty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user