Merge pull request #1556 from pi-hole/fix/macOS_exabytes

Do not log unrealistic disk usage (docker + macOS bug)
This commit is contained in:
DL6ER 2023-05-08 14:23:11 +02:00 committed by GitHub
commit b847da4f8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -86,9 +86,9 @@ static int check_space(const char *file, int LastUsage)
// exceeds the configured threshold and current usage is higher than
// usage in the last run (to prevent log spam)
perc = get_filepath_usage(file, buffer);
if(perc > config.check.disk && perc > LastUsage )
if(perc > config.check.disk && perc > LastUsage && perc <= 100.0)
log_resource_shortage(-1.0, 0, -1, perc, file, buffer);
return perc;
}