summaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-06-06 15:58:59 +0200
committerBert <ber.t@gmx.com>2011-06-06 15:58:59 +0200
commitb563a0adb2eb384b04354796eabe6065b6bc906f (patch)
treea833e235705eb85e4488960c737a9a64884222e9 /thumbs.c
parenta6100373c1be2796966fa7e15d7b41f2f8a112f7 (diff)
downloadnsxiv-b563a0adb2eb384b04354796eabe6065b6bc906f.tar.zst
Fixed mtime cache check on filesystems supporting nsec resolution
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thumbs.c b/thumbs.c
index 4501161..0670888 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -78,7 +78,7 @@ Imlib_Image* tns_cache_load(const char *filename) {
if ((cfile = tns_cache_filename(filename))) {
if (!stat(cfile, &cstats) &&
cstats.st_mtim.tv_sec == fstats.st_mtim.tv_sec &&
- cstats.st_mtim.tv_nsec == fstats.st_mtim.tv_nsec)
+ cstats.st_mtim.tv_nsec / 1000 == fstats.st_mtim.tv_nsec / 1000)
{
im = imlib_load_image(cfile);
}
@@ -103,7 +103,7 @@ void tns_cache_write(thumb_t *t, Bool force) {
if ((cfile = tns_cache_filename(t->filename))) {
if (force || stat(cfile, &cstats) ||
cstats.st_mtim.tv_sec != fstats.st_mtim.tv_sec ||
- cstats.st_mtim.tv_nsec != fstats.st_mtim.tv_nsec)
+ cstats.st_mtim.tv_nsec / 1000 != fstats.st_mtim.tv_nsec / 1000)
{
if ((dirend = strrchr(cfile, '/'))) {
*dirend = '\0';