diff options
-rw-r--r-- | mediagoblin/storage/filestorage.py | 7 |
1 files changed, 6 insertions, 1 deletions
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: |