Skip to content

Commit

Permalink
fix(xp): don't try to remove .gitkeep file in ./assets/cards
Browse files Browse the repository at this point in the history
  • Loading branch information
ZRunner committed Dec 18, 2024
1 parent b74a9bb commit 537b7ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/xp/xp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 537b7ee

Please sign in to comment.