From 9b775d26c49e22dad5da1021ff0b63103669bcae Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Fri, 14 Jun 2024 13:33:13 +0200 Subject: [PATCH] util/disk_cache: Fix cache marker refresh. Refresh if older than a day, not less than a day old. Fixes: 3f119a1fd8d ("util/disk_cache: Add marker on cache usage") Part-of: --- src/util/disk_cache_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/disk_cache_os.c b/src/util/disk_cache_os.c index d9a75cd7fc6..226cc8a65ec 100644 --- a/src/util/disk_cache_os.c +++ b/src/util/disk_cache_os.c @@ -1077,7 +1077,7 @@ disk_cache_touch_cache_user_marker(char *path) if (fd != -1) { close(fd); } - } else if (now - attr.st_mtime < 60 * 60 * 24 /* One day */) { + } else if (now - attr.st_mtime > 60 * 60 * 24 /* One day */) { (void)utime(marker_path, NULL); } free(marker_path);