From 9c968901024a8b540df9b61eb08f8fe2c320d701 Mon Sep 17 00:00:00 2001 From: Michael Knopke Date: Thu, 23 Jun 2022 14:18:56 +0200 Subject: [PATCH] fixing logic error --- src/CompressAsyncWorker.cc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/CompressAsyncWorker.cc b/src/CompressAsyncWorker.cc index 5876085..c33deb6 100644 --- a/src/CompressAsyncWorker.cc +++ b/src/CompressAsyncWorker.cc @@ -227,15 +227,18 @@ OFBool CompressAsyncWorker::recompress(const OFFilename &infile, const OFString E_TransferSyntax prefXfer = _prefXfer; // check if already compressed - if (!enableRecompression) { - if (originalXfer == EXS_Unknown || - originalXfer == EXS_LittleEndianImplicit || - originalXfer == EXS_BigEndianImplicit || - originalXfer == EXS_LittleEndianExplicit || - originalXfer == EXS_BigEndianExplicit || - originalXfer == EXS_DeflatedLittleEndianExplicit) { - DCMNET_INFO("Not recompressing file as this is disabled..."); - prefXfer = originalXfer; + if (!enableRecompression) + { + DCMIMGLE_INFO("Recompressing files is disabled"); + if (originalXfer != EXS_Unknown && + originalXfer != EXS_LittleEndianImplicit && + originalXfer != EXS_BigEndianImplicit && + originalXfer != EXS_LittleEndianExplicit && + originalXfer != EXS_BigEndianExplicit && + originalXfer != EXS_DeflatedLittleEndianExplicit) + { + DCMNET_INFO("File is compressed, not recompressing..."); + prefXfer = originalXfer; } }