From 50c8db2992bbe2b51524e90ff71c289abedeaa27 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Tue, 5 May 2026 08:10:59 -0500 Subject: [PATCH] browsercache_simple: Tweak index file size check. #1341 --- fanficfare/browsercache/browsercache_simple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fanficfare/browsercache/browsercache_simple.py b/fanficfare/browsercache/browsercache_simple.py index df820e4e..7533fe2a 100644 --- a/fanficfare/browsercache/browsercache_simple.py +++ b/fanficfare/browsercache/browsercache_simple.py @@ -79,8 +79,8 @@ class SimpleCache(BaseChromiumCache): logger.debug("Cache dir not found") return False index_file = os.path.join(cache_dir, "index") - if not (os.path.isfile(index_file) and os.path.getsize(index_file) == 24): - logger.debug("index file not found or wrong size(%s)"%os.path.getsize(index_file)) + if not os.path.isfile(index_file) or os.path.getsize(index_file) > 24: + logger.debug("index file not found or too big(%s)"%os.path.getsize(index_file)) return False real_index_file = os.path.join(cache_dir, "index-dir", "the-real-index") if not os.path.isfile(real_index_file):