diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-06-15 22:47:36 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-06-15 22:47:36 +0200 |
commit | e8bf9cef242d38702ed818086c9f263adb4e66c1 (patch) | |
tree | 175d321bc20d9a62577b0d188818e38f5397c426 | |
parent | 8aa4b9dac517a7faa16fe1ba1a9751c53028c433 (diff) | |
parent | 0c5d12145207fbd0c849ad145150bce839717465 (diff) | |
download | MultiMC-e8bf9cef242d38702ed818086c9f263adb4e66c1.tar MultiMC-e8bf9cef242d38702ed818086c9f263adb4e66c1.tar.gz MultiMC-e8bf9cef242d38702ed818086c9f263adb4e66c1.tar.lz MultiMC-e8bf9cef242d38702ed818086c9f263adb4e66c1.tar.xz MultiMC-e8bf9cef242d38702ed818086c9f263adb4e66c1.zip |
Merge branch 'develop' of https://github.com/lelandliu/MultiMC5 into develop
-rw-r--r-- | api/logic/minecraft/SimpleModList.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/logic/minecraft/SimpleModList.cpp b/api/logic/minecraft/SimpleModList.cpp index 59dd7cf3..f365438e 100644 --- a/api/logic/minecraft/SimpleModList.cpp +++ b/api/logic/minecraft/SimpleModList.cpp @@ -123,8 +123,8 @@ bool SimpleModList::installMod(const QString &filename) qDebug() << "Cannot recognize mod type of" << originalPath << ", ignoring it."; return false; } - auto newpath = FS::NormalizePath(FS::PathCombine(m_dir.path(), fileinfo.fileName())); + auto newpath = FS::NormalizePath(FS::PathCombine(m_dir.path(), fileinfo.fileName())); if(originalPath == newpath) { qDebug() << "Overwriting the mod (" << originalPath << ") with itself makes no sense..."; @@ -133,7 +133,7 @@ bool SimpleModList::installMod(const QString &filename) if (type == Mod::MOD_SINGLEFILE || type == Mod::MOD_ZIPFILE || type == Mod::MOD_LITEMOD) { - if(QFile::exists(newpath)) + if(QFile::exists(newpath) || QFile::exists(newpath.append(".disabled"))) { if(!QFile::remove(newpath)) { |