Adjust wording to be more precise

The variable name "current_changelog" was ambiguous. It could apply to both the newly obtained changelog from GOG and the previously saved changelog on the filesystem.
This commit is contained in:
Matthew Howle 2020-09-20 00:33:56 -04:00 committed by GitHub
parent 80b5d41eb6
commit 5cef659e98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2331,15 +2331,15 @@ void Downloader::saveChangelog(const std::string& changelog, const std::string&
}
}
// Check if changelog matches current changelog
// Check whether the changelog has changed
if (boost::filesystem::exists(filepath))
{
std::ifstream ifs(filepath);
if (ifs)
{
std::string current_changelog((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
std::string existing_changelog((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
ifs.close();
if (changelog == current_changelog)
if (changelog == existing_changelog)
{
std::cout << "Changelog unchanged. Skipping: " << filepath << std::endl;
return;