libsaria: Cache removes path if it exists

I wasn't checking if the path exists before removing it, and this caused
an error.  Checking before removing is simple enough, though...
This commit is contained in:
Bryan Schumaker 2011-04-16 08:52:28 -04:00
parent 6d08dedba5
commit 212a846d8c

View File

@ -30,7 +30,8 @@ class CacheObject:
if success: if success:
return path return path
else: else:
rm(path) if exists(path):
rm(path)
else: else:
return path return path