util/disk_cache: Fix cache marker refresh.

Refresh if older than a day, not less than a day old.

Fixes: 3f119a1fd8 ("util/disk_cache: Add marker on cache usage")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29728>
This commit is contained in:
Bas Nieuwenhuizen 2024-06-14 13:33:13 +02:00 committed by Marge Bot
parent b59ea3d63f
commit 9b775d26c4

View file

@ -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);