From b91e57669c520f51abbabcbe05bbe11cd50e9808 Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Sun, 16 Jul 2023 21:18:26 -0400 Subject: [PATCH] Updated cleaner to check for dir existing. --- cleaner.d | 1 + 1 file changed, 1 insertion(+) 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();