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
1 changed files with 2 additions and 1 deletions

View File

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