mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-11-24 13:53:07 +01:00
Fix: expire cache on filename change as well
This commit is contained in:
parent
6f364cf383
commit
fbf7f938fb
@ -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(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)
|
||||
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;
|
||||
|
||||
*resp = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user