Merge pull request #2694 from Janrupf/fix-disabled-mods

Operate on copy of QString instead of appending
This commit is contained in:
Petr Mrázek 2019-06-17 23:21:26 +02:00 committed by GitHub
commit ce12f1a734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,7 +133,7 @@ bool SimpleModList::installMod(const QString &filename)
if (type == Mod::MOD_SINGLEFILE || type == Mod::MOD_ZIPFILE || type == Mod::MOD_LITEMOD) if (type == Mod::MOD_SINGLEFILE || type == Mod::MOD_ZIPFILE || type == Mod::MOD_LITEMOD)
{ {
if(QFile::exists(newpath) || QFile::exists(newpath.append(".disabled"))) if(QFile::exists(newpath) || QFile::exists(newpath + QString(".disabled")))
{ {
if(!QFile::remove(newpath)) if(!QFile::remove(newpath))
{ {