diff --git a/cleaner.d b/cleaner.d index 3afb35b..1e2dc93 100644 --- a/cleaner.d +++ b/cleaner.d @@ -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();