From b372946516de4fb27b45eea584788942ec34dbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= Date: Fri, 6 Jan 2023 12:47:02 +0100 Subject: [PATCH] [ui] ThumbnailCache: check cache dir existence before cleaning --- meshroom/ui/components/thumbnail.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshroom/ui/components/thumbnail.py b/meshroom/ui/components/thumbnail.py index 899f8898..85f5e2bb 100644 --- a/meshroom/ui/components/thumbnail.py +++ b/meshroom/ui/components/thumbnail.py @@ -102,6 +102,11 @@ class ThumbnailCache(QObject): Scan the thumbnail directory and remove all thumbnails that have not been used for more than storageTimeLimit days. """ + # Check if thumbnail directory exists + if not os.path.exists(ThumbnailCache.thumbnailDir): + logging.debug('[ThumbnailCache] Thumbnail directory does not exist yet.') + return + # Get current time now = time.time()