nsxivb563a0a
Fixed mtime cache check on filesystems supporting nsec resolution
+3 −3
2 files changed
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | all: sxiv | |
| 2 | 2 | ||
| 3 | − | VERSION=git-20110603 | |
| 3 | + | VERSION=git-20110606 | |
| 4 | 4 | ||
| 5 | 5 | CC?=gcc | |
| 6 | 6 | DESTDIR?= | |
| @@ -78,7 +78,7 @@ Imlib_Image* tns_cache_load(const char *filename) { | |||
| 78 | 78 | if ((cfile = tns_cache_filename(filename))) { | |
| 79 | 79 | if (!stat(cfile, &cstats) && | |
| 80 | 80 | 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) | |
| 82 | 82 | { | |
| 83 | 83 | im = imlib_load_image(cfile); | |
| 84 | 84 | } | |
| @@ -103,7 +103,7 @@ void tns_cache_write(thumb_t *t, Bool force) { | |||
| 103 | 103 | if ((cfile = tns_cache_filename(t->filename))) { | |
| 104 | 104 | if (force || stat(cfile, &cstats) || | |
| 105 | 105 | 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) | |
| 107 | 107 | { | |
| 108 | 108 | if ((dirend = strrchr(cfile, '/'))) { | |
| 109 | 109 | *dirend = '\0'; | |