From 537b7ee5e4bccaa77acfdc5675d7404c16b942d4 Mon Sep 17 00:00:00 2001 From: ZRunner Date: Wed, 18 Dec 2024 14:42:44 +0100 Subject: [PATCH] fix(xp): don't try to remove .gitkeep file in ./assets/cards --- modules/xp/xp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/xp/xp.py b/modules/xp/xp.py index 753526524..eb43907e6 100644 --- a/modules/xp/xp.py +++ b/modules/xp/xp.py @@ -634,7 +634,7 @@ async def clear_cards_loop(self, delete_all: bool=False): folder_path = "./assets/cards/" files = os.listdir(folder_path) done: set[str] = set() - for f in sorted([f.split('-') for f in files], key=lambda f: int(f[1]), reverse=True): + for f in sorted([f.split('-') for f in files if not f.startswith('.')], key=lambda f: int(f[1]), reverse=True): if delete_all or f[0] in done: os.remove(folder_path + "-".join(f)) else: