fix mirroring. fix cache refresh bug

This commit is contained in:
Stewart Allen 2021-02-14 16:21:51 -05:00
commit 55baeea6c8
2 changed files with 12 additions and 6 deletions

12
app.js
View file

@ -780,10 +780,14 @@ function getCachedFile(file, fn) {
let smod = lastmod(filePath),
cmod = cached.mtime;
if (!smod) throw "missing source file";
if (smod > cmod) cached = null;
cached.lastcheck = now;
if (!smod) {
throw "missing source file";
}
if (smod > cmod) {
cached = null;
} else {
cached.lastcheck = now;
}
}
}