Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp @ 4976:03632ed1eb67 more-tags
merged default -> more-tags
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 13 Apr 2022 14:58:58 +0200 |
parents | 501411a67f10 17c91e054636 |
children | 8c9a1cce076e |
comparison
equal
deleted
inserted
replaced
4971:d68b3a2cea17 | 4976:03632ed1eb67 |
---|---|
3709 { | 3709 { |
3710 IWebDavCollection& that = *reinterpret_cast<IWebDavCollection*>(payload); | 3710 IWebDavCollection& that = *reinterpret_cast<IWebDavCollection*>(payload); |
3711 | 3711 |
3712 try | 3712 try |
3713 { | 3713 { |
3714 *isReadOnly = (that.StoreFile(WebDavConvertPath(pathSize, pathItems), data, size) ? 1 : 0); | 3714 if (static_cast<uint64_t>(static_cast<size_t>(size)) != size) |
3715 { | |
3716 ORTHANC_PLUGINS_THROW_EXCEPTION(NotEnoughMemory); | |
3717 } | |
3718 | |
3719 *isReadOnly = (that.StoreFile(WebDavConvertPath(pathSize, pathItems), data, | |
3720 static_cast<size_t>(size)) ? 1 : 0); | |
3715 return OrthancPluginErrorCode_Success; | 3721 return OrthancPluginErrorCode_Success; |
3716 } | 3722 } |
3717 catch (ORTHANC_PLUGINS_EXCEPTION_CLASS& e) | 3723 catch (ORTHANC_PLUGINS_EXCEPTION_CLASS& e) |
3718 { | 3724 { |
3719 return static_cast<OrthancPluginErrorCode>(e.GetErrorCode()); | 3725 return static_cast<OrthancPluginErrorCode>(e.GetErrorCode()); |