Fix removal of read-only files on Windows

This commit is contained in:
WobLight
2018-07-26 07:38:51 -07:00
parent 4600c475ce
commit dcc6d3e53b
+5 -2
View File
@@ -383,8 +383,11 @@ void Addon::removeFolder(QString path, bool ask) {
QFileInfo info(files[i]);
if (!info.isSymLink() && info.isDir())
info.dir().rmdir(info.fileName());
else
QFile(info.absoluteFilePath()).remove();
else {
QFile f(info.absoluteFilePath());
f.setPermissions(f.permissions()|QFile::WriteOther);
f.remove();
}
setProgress(i);
}
}