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>bb10
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…
Reference in New Issue