Try find more about error: "Cannot open %file for input" how was suggested on

stackoverflow.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-07-28 12:02:28 +03:00
parent e5cbf86ef2
commit 01be3c5181

View file

@ -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)