Skip to content

Commit

Permalink
workaround for incorrect 404 save
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Jul 2, 2017
1 parent 057435b commit be6ac1d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/gui/preview/PreviewModel.cpp
Expand Up @@ -233,6 +233,20 @@ bool PreviewModel::ParseSaveInfo(char * saveInfoResponse)
saveInfo->Favourite = tempFavourite;
saveInfo->Views = tempViews;
saveInfo->Version = tempVersion;

// This is a workaround for a bug on the TPT server where the wrong 404 save is returned
// Redownload the .cps file for a fixed version of the 404 save
if (tempID == 404 && this->saveID != 404)
{
if (saveDataDownload)
saveDataDownload->Cancel();
delete saveData;
saveData = NULL;
std::stringstream urlStream;
urlStream << "http://" << STATICSERVER << "/2157797.cps";
saveDataDownload = new Download(urlStream.str());
saveDataDownload->Start();
}
return true;
}
catch (std::exception &e)
Expand Down

1 comment on commit be6ac1d

@moonheart08
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@git123hub
Pinging me when im not involved will have fatal consequences.

Please sign in to comment.