From e5c9719b00e4dfcadfd9462c92203aaf0941f09f Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Fri, 9 Feb 2024 18:46:03 +0100 Subject: [PATCH] fix: windows stat check exists first --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 4facd83..0f07090 100755 --- a/main.py +++ b/main.py @@ -53,7 +53,7 @@ def downloadFlugfeldData(fromTime, toTime, dtype): fullpath = os.path.join(cacheDir, cacheFile) # remove empty placeholder cache file # - if os.path.getsize(fullpath) == 0: + if os.path.isfile(fullpath) and os.path.getsize(fullpath) == 0: os.remove(fullpath) # check for cache file