forked from qt-creator/qt-creator
Maemo: Fix file removal problem on Windows.
Apparently, we can't delete read-only files. Task-number: QTCREATORBUG-3343
This commit is contained in:
@@ -121,6 +121,7 @@ bool MaemoGlobal::removeRecursively(const QString &filePath, QString &error)
|
|||||||
QFileInfo fileInfo(filePath);
|
QFileInfo fileInfo(filePath);
|
||||||
if (!fileInfo.exists())
|
if (!fileInfo.exists())
|
||||||
return true;
|
return true;
|
||||||
|
QFile::setPermissions(filePath, fileInfo.permissions() | QFile::WriteUser);
|
||||||
if (fileInfo.isDir()) {
|
if (fileInfo.isDir()) {
|
||||||
QDir dir(filePath);
|
QDir dir(filePath);
|
||||||
QStringList fileNames = dir.entryList(QDir::Files | QDir::Hidden
|
QStringList fileNames = dir.entryList(QDir::Files | QDir::Hidden
|
||||||
|
|||||||
Reference in New Issue
Block a user