Skip to content

Commit

Permalink
Log filelist URL to download in --verbose mode.
Browse files Browse the repository at this point in the history
Also rename from "master file" to "update filelist"
  • Loading branch information
Flamefire committed Sep 2, 2024
1 parent 10b486c commit ed128d5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/s25update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,12 @@ void executeUpdate(int argc, char* argv[])
const auto possibleBases = getPossibleHttpBases(nightly);
for(size_t i = 0; i < possibleBases.size(); i++)
{
auto filelistOpt = DownloadFile(possibleBases[i] + FILELIST);
const std::string url = possibleBases[i] + FILELIST;
if(verbose)
bnw::cout << "Trying to download update filelist from '" << url << '"' << std::endl;
auto filelistOpt = DownloadFile(url);
if(!filelistOpt)
bnw::cout << "Warning: Was not able to get masterfile " << i << ", trying older one" << std::endl;
bnw::cout << "Warning: Was not able to get update filelist " << i << ", trying older one" << std::endl;
else
{
filelist = *filelistOpt;
Expand All @@ -655,7 +658,7 @@ void executeUpdate(int argc, char* argv[])
}
}
if(filelist.empty())
throw std::runtime_error("Could not get any master file");
throw std::runtime_error("Could not get any update filelist");

// httpbase now includes targetpath and filepath

Expand Down

0 comments on commit ed128d5

Please sign in to comment.