Index: sources/storage/Logger.cpp =================================================================== diff -u -rc2ed4667b513c51c5ee31566c15d2cf5a042ed61 -ra76eeb1808fb6012897a86d2d7f318dda85773b4 --- sources/storage/Logger.cpp (.../Logger.cpp) (revision c2ed4667b513c51c5ee31566c15d2cf5a042ed61) +++ sources/storage/Logger.cpp (.../Logger.cpp) (revision a76eeb1808fb6012897a86d2d7f318dda85773b4) @@ -497,14 +497,17 @@ // has been tested manually LOG_DEBUG(tr("Initializing log clean up")); int removeCount = 0; - auto logTypes = { eLogAppED , eLogDebug , eLogCloud , eLogTrtmt }; - auto logType = { vLogType }; + auto logFiles = { eLogAppED , eLogDebug , eLogCloud }; + auto logFile = { vLogType }; // Is mostly used for the txr files which are in separate partition. - for ( const auto &iType : ( vLogType == eLogAll ? logTypes : logType ) ) { + for ( const auto &iType : ( vLogType == eLogFiles ? logFiles : logFile ) ) { QString mCSource = _logPathNames [iType]; QString mCExtension = _logFileNameExt[iType]; // DEBUG: qDebug() << "@" << mCSource << mLogFileFilter << mCExtension << iType << _logTypeMaxUsageLimit[iType]; - QFileInfoList fileInfoList = FileHandler::find(mCSource, {"*.*"}, _logTypeMaxUsageLimit[iType]); + QFileInfoList fileInfoList = FileHandler::find( + mCSource , // where to look + {"*.*"} , // what to delete // it means the removal will be for all the files in that location and won't look at the mCExtension + _logTypeMaxUsageLimit[iType]); // how many/much removeCount = fileInfoList.count(); // qDebug() << "@" << removeCount << fileInfoList; if (removeCount) { Index: sources/storage/Logger.h =================================================================== diff -u -rc2ed4667b513c51c5ee31566c15d2cf5a042ed61 -ra76eeb1808fb6012897a86d2d7f318dda85773b4 --- sources/storage/Logger.h (.../Logger.h) (revision c2ed4667b513c51c5ee31566c15d2cf5a042ed61) +++ sources/storage/Logger.h (.../Logger.h) (revision a76eeb1808fb6012897a86d2d7f318dda85773b4) @@ -90,7 +90,7 @@ eLogTrtmt, ///< Treatment Rep Files : Treatment Report files eLogType_Count , - eLogAll , + eLogFiles , }; Q_ENUM(LogType) @@ -200,9 +200,9 @@ // ----- Remove Old Logs structure private: - int removeLogs(LogType vLogType = eLogAll); + int removeLogs(LogType vLogType = eLogFiles); private slots: // this slot is thread safe and can be called from outside but preferred not to. - bool concurrentRemoveLogs(LogType vLogType = eLogAll); + bool concurrentRemoveLogs(LogType vLogType = eLogFiles); void onRemoveLogs(); void onCryptSetupMount (bool vPass); Index: sources/storage/StorageGlobals.cpp =================================================================== diff -u -rc2ed4667b513c51c5ee31566c15d2cf5a042ed61 -ra76eeb1808fb6012897a86d2d7f318dda85773b4 --- sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision c2ed4667b513c51c5ee31566c15d2cf5a042ed61) +++ sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision a76eeb1808fb6012897a86d2d7f318dda85773b4) @@ -69,7 +69,7 @@ // therefore the Txr shall not use more than 75% to leave the 25 for settings. // when reaches that percent will be deleted to get total usage of 50% // 50% percent of 32MB is 16MB which is enough to keep 10K (estimated each txr are 4K rounded to 5K and doubled.) of ~1600 files. - const short Txr_Min_Available_Total_Space_Percent = 25; // min space needed for settings by the current definitions. + const short Txr_Min_Available_Total_Space_Percent = 20; // min space needed for settings by the current definitions. const short Txr_Max_Allowable_Trtmt_Space_Percent = 50; // the treatment files are moved to the encrypted partition. short Txr_Min_Available_Total_Space_IsLow(short vPercent) { return vPercent < Txr_Min_Available_Total_Space_Percent; }