# HG changeset patch # User Sebastien Jodogne # Date 1442565583 -7200 # Node ID 76ed4cf74bb5d8d6544ca9970e02cf8c69838a14 # Parent 0b8e62bd9c487548b9c73aa253aad657736afa5b Add ".dcm" suffix to files in ZIP archives diff -r 0b8e62bd9c48 -r 76ed4cf74bb5 NEWS --- a/NEWS Thu Sep 17 07:28:24 2015 +0200 +++ b/NEWS Fri Sep 18 10:39:43 2015 +0200 @@ -1,6 +1,8 @@ Pending changes in the mainline =============================== +* Add ".dcm" suffix to files in ZIP archives (cf. URI ".../archive") + Version 0.9.4 (2015/09/16) ========================== diff -r 0b8e62bd9c48 -r 76ed4cf74bb5 OrthancServer/OrthancRestApi/OrthancRestArchive.cpp --- a/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp Thu Sep 17 07:28:24 2015 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp Fri Sep 18 10:39:43 2015 +0200 @@ -199,7 +199,7 @@ case ResourceType_Series: { // Create a filename prefix, depending on the modality - char format[16] = "%08d"; + char format[24] = "%08d.dcm"; if (resource["MainDicomTags"].isMember("Modality")) { @@ -207,15 +207,15 @@ if (modality.size() == 1) { - snprintf(format, sizeof(format) - 1, "%c%%07d", toupper(modality[0])); + snprintf(format, sizeof(format) - 1, "%c%%07d.dcm", toupper(modality[0])); } else if (modality.size() >= 2) { - snprintf(format, sizeof(format) - 1, "%c%c%%06d", toupper(modality[0]), toupper(modality[1])); + snprintf(format, sizeof(format) - 1, "%c%c%%06d.dcm", toupper(modality[0]), toupper(modality[1])); } } - char filename[16]; + char filename[24]; for (Json::Value::ArrayIndex i = 0; i < resource["Instances"].size(); i++) {