diff --git a/src/test/ValentinaTest/abstracttest.cpp b/src/test/ValentinaTest/abstracttest.cpp index 89f12ac69..ecedba3dd 100644 --- a/src/test/ValentinaTest/abstracttest.cpp +++ b/src/test/ValentinaTest/abstracttest.cpp @@ -176,7 +176,16 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg } } + // Check error: Cannot open %file for input QFile srcFile(srcFilePath); + if (not srcFile.open(QFile::ReadOnly)) + { + const QString msg = QString("Error: %3").arg(srcFile.errorString()); + QWARN(qUtf8Printable(msg)); + return false; + } + srcFile.close(); + if (not srcFile.copy(tgtFilePath)) { const QString msg = QString("Can't copy file '%1' to '%2'. Error: %3").arg(srcFilePath).arg(tgtFilePath)