Index: sources/storage/filehandler.cpp =================================================================== diff -u -rd2035a8728794afeefaa244bf8d1597926d945f5 -rbf645acccabb7b5a84801620c4f7fa0b0e6878e0 --- sources/storage/filehandler.cpp (.../filehandler.cpp) (revision d2035a8728794afeefaa244bf8d1597926d945f5) +++ sources/storage/filehandler.cpp (.../filehandler.cpp) (revision bf645acccabb7b5a84801620c4f7fa0b0e6878e0) @@ -1,16 +1,16 @@ /*! - * + * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. - * + * * \file filehandler.cpp * \author (last) Behrouz NematiPour * \date (last) 22-Apr-2020 * \author (original) Behrouz NematiPour * \date (original) 24-Sep-2019 - * + * */ #include "filehandler.h" @@ -49,8 +49,8 @@ QFile::OpenMode openMode = vAppend ? QFile::Text | QFile::Append : QFile::Text | QFile::WriteOnly; + // coco begin validated : This has been manually test. Needs filesystem access to make file the way it can't be opened for writing. if (! file.open(openMode)) { - // coco begin validated : This has been manually test. Needs filesystem access to make file the way it can't be opened for writing. QString msg = QString("Can't open file for write (%1).Possible corrupted file system").arg(vFileName); errOut (msg); LOG_DEBUG(msg); @@ -125,21 +125,19 @@ for (const auto &info : infoList) { QDateTime fileTime = info.lastModified(); QString fileName = info.absoluteFilePath(); + // coco begin validated : This has been manually tested since requires to change in file system to reproduce the error. if (fileTime.isValid()) { if (fileTime.date() <= vDateOlderThan) { if (QFile::remove(fileName)) { ++countRemoved; LOG_DEBUG(QString("%1 File(s) %2 removed").arg(countRemoved).arg(fileName)); } else { - // coco begin validated : This has been manually tested since requires to change in file system to reproduce the error. LOG_DEBUG(QString("Can't delete file : ") + fileName); } - // coco end } } else { - // coco begin validated : This has been manually tested since requires to change in file system to reproduce the error. LOG_DEBUG(QString("Can't get last modified date of file : ") + fileName); } // coco end