Permalink
Browse files

workaround for incorrect 404 save

  • Loading branch information...
jacob1 committed Jul 2, 2017
1 parent 057435b commit be6ac1d91e1ba0f51a59d20de61c18e4cdae8a97
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/gui/preview/PreviewModel.cpp
@@ -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)

1 comment on commit be6ac1d

@moonheart08

This comment has been minimized.

Contributor

moonheart08 commented on be6ac1d Jul 13, 2017

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

Please sign in to comment.