Fix removal of read-only files on Windows
This commit is contained in:
@@ -383,8 +383,11 @@ void Addon::removeFolder(QString path, bool ask) {
|
|||||||
QFileInfo info(files[i]);
|
QFileInfo info(files[i]);
|
||||||
if (!info.isSymLink() && info.isDir())
|
if (!info.isSymLink() && info.isDir())
|
||||||
info.dir().rmdir(info.fileName());
|
info.dir().rmdir(info.fileName());
|
||||||
else
|
else {
|
||||||
QFile(info.absoluteFilePath()).remove();
|
QFile f(info.absoluteFilePath());
|
||||||
|
f.setPermissions(f.permissions()|QFile::WriteOther);
|
||||||
|
f.remove();
|
||||||
|
}
|
||||||
setProgress(i);
|
setProgress(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user