diff options
author | Leland Liu <14846866+lelandliu@users.noreply.github.com> | 2019-06-14 15:48:24 -0400 |
---|---|---|
committer | Leland Liu <14846866+lelandliu@users.noreply.github.com> | 2019-06-14 15:48:24 -0400 |
commit | 0c5d12145207fbd0c849ad145150bce839717465 (patch) | |
tree | 20f1b49cbc74a22197fa45c565fba4bfe1754667 /api/logic/minecraft | |
parent | 53ad5cb436ea4bffb93c7d26a1be43690a21bf0d (diff) | |
download | MultiMC-0c5d12145207fbd0c849ad145150bce839717465.tar MultiMC-0c5d12145207fbd0c849ad145150bce839717465.tar.gz MultiMC-0c5d12145207fbd0c849ad145150bce839717465.tar.lz MultiMC-0c5d12145207fbd0c849ad145150bce839717465.tar.xz MultiMC-0c5d12145207fbd0c849ad145150bce839717465.zip |
Fixed adding a disabled duplicate
Diffstat (limited to 'api/logic/minecraft')
-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)) { |