changeset 146:c7f1cea08f6f

merge
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Oct 2012 17:50:50 +0200
parents efe5be1d6afc (current diff) e7e19f042eb5 (diff)
children 7e8b68dd6ace
files
diffstat 3 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Core/FileStorage.cpp	Thu Oct 11 17:50:15 2012 +0200
+++ b/Core/FileStorage.cpp	Thu Oct 11 17:50:50 2012 +0200
@@ -293,6 +293,19 @@
 #endif
   }
 
+  void FileStorage::UncheckedRemove(const std::string& uuid)
+  {
+    try
+    {
+      Remove(uuid);
+    }
+    catch (boost::filesystem::filesystem_error)
+    {
+      // Ignore the error
+    }
+  }
+
+
 
   uintmax_t FileStorage::GetCapacity() const
   {
--- a/Core/FileStorage.h	Thu Oct 11 17:50:15 2012 +0200
+++ b/Core/FileStorage.h	Thu Oct 11 17:50:50 2012 +0200
@@ -82,6 +82,8 @@
 
     void Remove(const std::string& uuid);
 
+    void UncheckedRemove(const std::string& uuid);
+
     uintmax_t GetCapacity() const;
 
     uintmax_t GetAvailableSpace() const;
--- a/OrthancServer/ServerIndex.cpp	Thu Oct 11 17:50:15 2012 +0200
+++ b/OrthancServer/ServerIndex.cpp	Thu Oct 11 17:50:50 2012 +0200
@@ -607,8 +607,8 @@
 
     if (status != StoreStatus_Success)
     {
-      storage.Remove(fileUuid);
-      storage.Remove(jsonUuid);
+      storage.UncheckedRemove(fileUuid);
+      storage.UncheckedRemove(jsonUuid);
     }
 
     switch (status)