mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Merge branch 'changelog' of https://github.com/mdhowle/lgogdownloader into master
This commit is contained in:
commit
17bebfc374
@ -2340,6 +2340,22 @@ void Downloader::saveChangelog(const std::string& changelog, const std::string&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check whether the changelog has changed
|
||||||
|
if (boost::filesystem::exists(filepath))
|
||||||
|
{
|
||||||
|
std::ifstream ifs(filepath);
|
||||||
|
if (ifs)
|
||||||
|
{
|
||||||
|
std::string existing_changelog((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
|
||||||
|
ifs.close();
|
||||||
|
if (changelog == existing_changelog)
|
||||||
|
{
|
||||||
|
std::cout << "Changelog unchanged. Skipping: " << filepath << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::ofstream ofs(filepath);
|
std::ofstream ofs(filepath);
|
||||||
if (ofs)
|
if (ofs)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user