]> Cypherpunks.ru repositories - gocheese.git/blobdiff - refresh.go
Fix mtimeless touch logic
[gocheese.git] / refresh.go
index 55c30e085e1437f904d58798695d771638aa4f24..59c8ceb9f5dd7c2b6288e27eb1d1cc0c9f6574e9 100644 (file)
@@ -551,8 +551,8 @@ func refreshDir(
                }
                path = path + "." + hashAlgo
                stat, err := os.Stat(path)
-               if err == nil &&
-                       (mtimeExists && stat.ModTime().Truncate(time.Second).Equal(mtime)) {
+               if err == nil && (!mtimeExists ||
+                       (mtimeExists && stat.ModTime().Truncate(time.Second).Equal(mtime))) {
                        continue
                }
                if err != nil && !os.IsNotExist(err) {