mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-09-01 12:39:30 +00:00
Merge branch 'develop' of https://github.com/lelandliu/MultiMC5 into develop
This commit is contained in:
commit
e8bf9cef24
@ -123,8 +123,8 @@ bool SimpleModList::installMod(const QString &filename)
|
|||||||
qDebug() << "Cannot recognize mod type of" << originalPath << ", ignoring it.";
|
qDebug() << "Cannot recognize mod type of" << originalPath << ", ignoring it.";
|
||||||
return false;
|
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)
|
if(originalPath == newpath)
|
||||||
{
|
{
|
||||||
qDebug() << "Overwriting the mod (" << originalPath << ") with itself makes no sense...";
|
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 (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))
|
if(!QFile::remove(newpath))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user