QTest::qExtractTestData(): Set permissions of extracted files.
Currently, the files are extracted with read-only permissions. If the data are extracted under a temporary directory, this prevents it from being deleted, causing a leak and test failures (for example, tst_qfileinfo). Change-Id: Idc85f31265af234446ed21d736e9a2b9866dc62d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
parent
861cbef49f
commit
25fb41a58c
@ -2839,6 +2839,10 @@ QString QTest::qExtractTestData(const QString &dirName)
|
||||
qWarning("Failed to copy '%s'.", qPrintable(fileInfo.filePath()));
|
||||
return QString();
|
||||
}
|
||||
if (!QFile::setPermissions(destination, QFile::ReadUser | QFile::WriteUser | QFile::ReadGroup)) {
|
||||
qWarning("Failed to set permissions on '%s'.", qPrintable(destination));
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user