Fix: expire cache on filename change as well

This commit is contained in:
Nikita Ivanov 2023-03-16 21:47:11 +01:00
parent 6f364cf383
commit fbf7f938fb
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -144,10 +144,10 @@ static RESULT is_newer(int *resp, char *f1, char *f2)
ERRCHK_RET_ERN(lstat(f1, &stat1) == -1); ERRCHK_RET_ERN(lstat(f1, &stat1) == -1);
ERRCHK_RET_ERN(lstat(f2, &stat2) == -1); ERRCHK_RET_ERN(lstat(f2, &stat2) == -1);
int sec_d = stat1.st_mtim.tv_sec - stat2.st_mtim.tv_sec; int sec_d = stat1.st_ctim.tv_sec - stat2.st_ctim.tv_sec;
if (sec_d < 0) if (sec_d < 0)
goto older; goto older;
else if (sec_d == 0 && stat1.st_mtim.tv_nsec <= stat2.st_mtim.tv_nsec) else if (sec_d == 0 && stat1.st_ctim.tv_nsec <= stat2.st_ctim.tv_nsec)
goto older; goto older;
*resp = 1; *resp = 1;