]> www.dolda2000.com Git - ashd.git/commitdiff
sendfile: Properly update lastclean timestamp. master
authorFredrik Tolf <fredrik@dolda2000.com>
Wed, 21 Jan 2026 18:32:32 +0000 (19:32 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Wed, 21 Jan 2026 18:32:32 +0000 (19:32 +0100)
src/compress.c

index 6154687259ee9013618fd4b70bb0499e5da0f388..e1f05fa84c24a8014e875010822547932bb7ab7e 100644 (file)
@@ -26,6 +26,7 @@
 #include <time.h>
 #include <dirent.h>
 #include <sys/stat.h>
+#include <sys/time.h>
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -160,8 +161,10 @@ static void checkclean(void)
        }
     }
     close(fd);
-    if((fd = open(sprintf3("%s/lastclean", cachedir()), O_WRONLY | O_CREAT, 0600)) >= 0)
+    if((fd = open(sprintf3("%s/lastclean", cachedir()), O_WRONLY | O_CREAT, 0600)) >= 0) {
+       futimes(fd, NULL);;
        close(fd);
+    }
     if((dp = opendir(cachedir())) == NULL)
        return;
     while((ent = readdir(dp)) != NULL) {