瀏覽代碼

Fixed mtime cache check on filesystems supporting nsec resolution

master
Bert 13 年之前
父節點
當前提交
b563a0adb2
共有 2 個檔案被更改,包括 3 行新增3 行删除
  1. +1
    -1
      Makefile
  2. +2
    -2
      thumbs.c

+ 1
- 1
Makefile 查看文件

@@ -1,6 +1,6 @@
all: sxiv

VERSION=git-20110603
VERSION=git-20110606

CC?=gcc
DESTDIR?=


+ 2
- 2
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';


Loading…
取消
儲存