mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 09:50:36 +02:00
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> (cherry picked from commit9b775d26c4)
This commit is contained in:
parent
10d38dd727
commit
46ae863f9e
2 changed files with 2 additions and 2 deletions
|
|
@ -1434,7 +1434,7 @@
|
|||
"description": "util/disk_cache: Fix cache marker refresh.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "3f119a1fd8deaa46c4342837d13096cd7873c8d2",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue