From ddaf070ad7e8819f539d2d9dedc73f4e26a19848 Mon Sep 17 00:00:00 2001 From: Jorge Araya Navarro Date: Fri, 22 Jun 2012 15:15:57 -0600 Subject: [PATCH] Bug 255 fixed --- mediagoblin/storage/filestorage.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mediagoblin/storage/filestorage.py b/mediagoblin/storage/filestorage.py index 00d6335e..1252a3f5 100644 --- a/mediagoblin/storage/filestorage.py +++ b/mediagoblin/storage/filestorage.py @@ -64,7 +64,12 @@ class BasicFileStorage(StorageInterface): def delete_file(self, filepath): # TODO: Also delete unused directories if empty (safely, with # checks to avoid race conditions). - os.remove(self._resolve_filepath(filepath)) + try: + os.remove(self._resolve_filepath(filepath)) + except OSError: + # the file do not exists! + # This should fix bug #255 + pass def file_url(self, filepath): if not self.base_url: