diff OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp @ 4765:71fbdee4b832

Fix upload of ZIP archives containing a DICOMDIR file
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 13 Aug 2021 17:41:09 +0200
parents d16c3c7f11ef
children 61da49321754 94616af363ec
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp	Mon Aug 09 08:50:04 2021 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp	Fri Aug 13 17:41:09 2021 +0200
@@ -211,6 +211,15 @@
             {
               LOG(ERROR) << "Cannot import non-DICOM file from ZIP archive: " << filename;
             }
+            else if (e.GetErrorCode() == ErrorCode_InexistentTag)
+            {
+              /**
+               * Allow upload of ZIP archives containing a DICOMDIR
+               * file (new in Orthanc 1.9.7):
+               * https://groups.google.com/g/orthanc-users/c/sgBU89o4nhU/m/kbRAYiQUAAAJ
+               **/
+              LOG(ERROR) << "Ignoring what is probably a DICOMDIR file within a ZIP archive: \"" << filename << "\"";
+            }
             else
             {
               throw;