diff --git a/libsaria/cache.py b/libsaria/cache.py index 19db5329..0efb966a 100644 --- a/libsaria/cache.py +++ b/libsaria/cache.py @@ -7,6 +7,7 @@ mkdir = path.mkdir exists = path.exists join = path.join ls = path.ls +rm = path.rm CACHE_DIR = expand("~/.saria/cache") mkdir(CACHE_DIR) @@ -26,6 +27,9 @@ class CacheObject: pass if success: return path + else: + rm(path) + else: return path