Try find more about error: "Cannot open %file for input" how was suggested on
stackoverflow. --HG-- branch : develop
This commit is contained in:
parent
e5cbf86ef2
commit
01be3c5181
|
@ -176,7 +176,16 @@ bool AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check error: Cannot open %file for input
|
||||||
QFile srcFile(srcFilePath);
|
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))
|
if (not srcFile.copy(tgtFilePath))
|
||||||
{
|
{
|
||||||
const QString msg = QString("Can't copy file '%1' to '%2'. Error: %3").arg(srcFilePath).arg(tgtFilePath)
|
const QString msg = QString("Can't copy file '%1' to '%2'. Error: %3").arg(srcFilePath).arg(tgtFilePath)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user