import hashlib
import os
import pickle
-import shutil
+# TODO: Check for $XDG_CACHE_HOME
dired = f"{os.path.expanduser('~')}/.cache/lightcards/"
def purge(stra):
"""Delete pickle file"""
- file = f"{dired}/{name_gen(stra)}/"
+ file = f"{dired}/{name_gen(stra)}.p"
if os.path.exists(file):
- shutil.rmtree(file)
+ os.remove(file)