Fix global checksum calculation

This commit is contained in:
Michael Friedrich 2018-10-26 14:20:14 +02:00
parent 7a02990ef8
commit c230e503e6
1 changed files with 16 additions and 1 deletions

View File

@ -599,7 +599,22 @@ String ApiListener::GetGlobalChecksum(const ConfigDirInformation& config)
ObjectLock olock(checksums);
for (const Dictionary::Pair& kv : checksums) {
result += GetChecksum(kv.second);
String path = kv.first;
String checksum = kv.second;
/* Only use configuration files for checksum calculation. */
//if (!Utility::Match("*.conf", path))
// continue;
/* Ignore internal files, especially .timestamp and .checksums.
* If we don't, this results in "always change" restart loops.
*/
if (Utility::Match("/.*", path))
continue;
Log(LogCritical, "ApiListener")
<< "Adding checksum for " << kv.first << ": " << kv.second;
result += kv.second;
}
return GetChecksum(result);