# HG changeset patch # User Sebastien Jodogne # Date 1349970650 -7200 # Node ID c7f1cea08f6f07370c74915568decc73d824ad3c # Parent efe5be1d6afc001677a3ebb1331d3d33b42b2c16# Parent e7e19f042eb55e30b4bf4564eb58f037143ede11 merge diff -r efe5be1d6afc -r c7f1cea08f6f Core/FileStorage.cpp --- 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 { diff -r efe5be1d6afc -r c7f1cea08f6f Core/FileStorage.h --- 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; diff -r efe5be1d6afc -r c7f1cea08f6f OrthancServer/ServerIndex.cpp --- 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)