fix: windows stat check exists first

This commit is contained in:
2024-02-09 18:46:03 +01:00
parent 5209bf06ca
commit e5c9719b00

View File

@@ -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