From a7c1928c0fc30b0b0f053f8c1e1a7d7c687a34ea Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Fri, 28 Mar 2025 15:13:47 +0100 Subject: [PATCH] Small fix for when last fetched was zero bytes --- changedetectionio/model/Watch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changedetectionio/model/Watch.py b/changedetectionio/model/Watch.py index db9222faa25..3fbe8f94a72 100644 --- a/changedetectionio/model/Watch.py +++ b/changedetectionio/model/Watch.py @@ -575,7 +575,7 @@ def get_last_fetched_text_before_filters(self): import brotli filepath = os.path.join(self.watch_data_dir, 'last-fetched.br') - if not os.path.isfile(filepath): + if not os.path.isfile(filepath) or os.path.getsize(filepath) == 0: # If a previous attempt doesnt yet exist, just snarf the previous snapshot instead dates = list(self.history.keys()) if len(dates):