Index: sources/storage/Logger.cpp =================================================================== diff -u -rcf51c19d82d667644d7f70eaa521b43f908c7068 -r2912750c8e787739f2cb2069fee1b33195a9ef54 --- sources/storage/Logger.cpp (.../Logger.cpp) (revision cf51c19d82d667644d7f70eaa521b43f908c7068) +++ sources/storage/Logger.cpp (.../Logger.cpp) (revision 2912750c8e787739f2cb2069fee1b33195a9ef54) @@ -7,7 +7,7 @@ * * \file Logger.cpp * \author (last) Behrouz NematiPour - * \date (last) 15-Oct-2022 + * \date (last) 25-Jul-2023 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -260,7 +260,6 @@ // use the Settings path first (/var/configurations (Encrypted Partition)) if ( ! QDir (basePath ).exists( )) { basePath = Storage::Standard_tmp; goto lOut; } if ( ! FileHandler::makeFolder (basePath + Storage::Log_Folder_Treatment )) { basePath = Storage::Standard_tmp; goto lOut; } - if ( ! FileHandler::makeFolder (basePath + Storage::Log_Folder_Pending )) { basePath = Storage::Standard_tmp; goto lOut; } lOut: _logPathNames[vLogType] = basePath + Storage::Log_Folder_Treatment; @@ -347,8 +346,10 @@ if (logPathName.isEmpty()) logPathName = _logPathNames[eLogDebug]; _logFileName = logPathName + fileName; - FileHandler::write(_logFileName, mContent + "\r\n", true); + bool isWritten = FileHandler::write(_logFileName, mContent + "\r\n", true); + if(!isWritten) emit didLogIOFail(); + // console out the log if enabled. if (_enableConsoleOut) { qDebug().noquote() << mContent; @@ -462,6 +463,12 @@ // disabled coco begin validated: This needs user interaction to export to USB device // has been tested manually LOG_DEBUG(QString("Export %1 ended: %2").arg(_logNames[_exportLogsType]).arg(_exportLogsWatcher.result())); + + //DEBUG: qDebug()<< "_exportLogsWatcher.result()" << _exportLogsWatcher.result(); + if(!_exportLogsWatcher.result()){ + emit didLogIOFail(); + return; + } emit didExportLogs(); } // disabled coco end