Index: sources/device/DeviceController.cpp =================================================================== diff -u -rcad1ea2c3c42c93461f4197921f8a5938fe872c8 -r170fd9a04fab2e2ba96bdc16ca39f86789895937 --- sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision cad1ea2c3c42c93461f4197921f8a5938fe872c8) +++ sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision 170fd9a04fab2e2ba96bdc16ca39f86789895937) @@ -996,7 +996,7 @@ if ( isBootPOST && isCurrent ) { // no log backup if it is the BootPOST log file, only rename and add the serial to it. fileDest = QString("%1/%2.%3").arg(filePath, fileBase.prepend(_Logger.logFileNameHDSN() + _Logger.fileSeparator()), fileInfo.completeSuffix()); - ok = QFile::rename(fileSrc, fileDest); + ok = FileHandler::append(fileSrc, fileDest, true); return false; } Index: sources/storage/FileHandler.cpp =================================================================== diff -u -rca40cfec5ff6b63d4685ceb2e62ebe9366adcfd0 -r170fd9a04fab2e2ba96bdc16ca39f86789895937 --- sources/storage/FileHandler.cpp (.../FileHandler.cpp) (revision ca40cfec5ff6b63d4685ceb2e62ebe9366adcfd0) +++ sources/storage/FileHandler.cpp (.../FileHandler.cpp) (revision 170fd9a04fab2e2ba96bdc16ca39f86789895937) @@ -58,6 +58,22 @@ ++count; } +bool FileHandler::append(const QString &vSource, const QString &vTarget, bool vRemoveSource) { + bool ok = false; + QString content; + ok = read(vSource, content); + if ( ! ok ) goto lOut; + + ok = write(vTarget, content, true); + if ( ! ok ) goto lOut; + + if ( ! vRemoveSource ) goto lOut; + ok = QFile::remove(vSource); + if ( ! ok ) goto lOut; + +lOut: + return ok; +} /*! * \brief FileHandler::write * \details writes content vContent into the file vFileName. Index: sources/storage/FileHandler.h =================================================================== diff -u -rca40cfec5ff6b63d4685ceb2e62ebe9366adcfd0 -r170fd9a04fab2e2ba96bdc16ca39f86789895937 --- sources/storage/FileHandler.h (.../FileHandler.h) (revision ca40cfec5ff6b63d4685ceb2e62ebe9366adcfd0) +++ sources/storage/FileHandler.h (.../FileHandler.h) (revision 170fd9a04fab2e2ba96bdc16ca39f86789895937) @@ -69,6 +69,7 @@ static int removeFiles (const QStringList &vFolders, const QStringList &vNameFilter, const QDate &vDateOlderThan); static bool makeFolder (const QString &vFolder); static bool isMounted (const QString &vPath, bool *vIsReadOnly = nullptr); + static bool append (const QString &vSource , const QString &vTarget , bool vRemoveSource); static bool tmpUsable ();