Updated cleaner to check for dir existing.

This commit is contained in:
Andrew Lalis 2023-07-16 21:18:26 -04:00
parent 9156db7017
commit b91e57669c
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import std.datetime;
const EXTRACTS_DIR = "extracts";
int main() {
if (!exists(EXTRACTS_DIR)) return 0;
immutable SysTime now = Clock.currTime();
foreach (DirEntry entry; dirEntries(EXTRACTS_DIR, SpanMode.shallow, false)) {
Duration age = now - entry.timeLastModified();