Krolyxon
Commit b563a0a

Branches

Refs →

nsxivb563a0a

Fixed mtime cache check on filesystems supporting nsec resolution

Author
Bert
Date
2011-06-06 15:58 +0200
Parent
a610037
Commit
b563a0adb2eb384b04354796eabe6065b6bc906f

+3 −3

2 files changed

  1. M Makefile +1 −1
  2. M thumbs.c +2 −2
M Makefile View
@@ -1,6 +1,6 @@
11 all: sxiv
22
3−VERSION=git-20110603
3+VERSION=git-20110606
44
55 CC?=gcc
66 DESTDIR?=
M thumbs.c View
@@ -78,7 +78,7 @@ Imlib_Image* tns_cache_load(const char *filename) {
7878 if ((cfile = tns_cache_filename(filename))) {
7979 if (!stat(cfile, &cstats) &&
8080 cstats.st_mtim.tv_sec == fstats.st_mtim.tv_sec &&
81− cstats.st_mtim.tv_nsec == fstats.st_mtim.tv_nsec)
81+ cstats.st_mtim.tv_nsec / 1000 == fstats.st_mtim.tv_nsec / 1000)
8282 {
8383 im = imlib_load_image(cfile);
8484 }
@@ -103,7 +103,7 @@ void tns_cache_write(thumb_t *t, Bool force) {
103103 if ((cfile = tns_cache_filename(t->filename))) {
104104 if (force || stat(cfile, &cstats) ||
105105 cstats.st_mtim.tv_sec != fstats.st_mtim.tv_sec ||
106− cstats.st_mtim.tv_nsec != fstats.st_mtim.tv_nsec)
106+ cstats.st_mtim.tv_nsec / 1000 != fstats.st_mtim.tv_nsec / 1000)
107107 {
108108 if ((dirend = strrchr(cfile, '/'))) {
109109 *dirend = '\0';