diff --git a/api/logic/minecraft/SimpleModList.cpp b/api/logic/minecraft/SimpleModList.cpp index a9fb42ebd..e8583a35a 100644 --- a/api/logic/minecraft/SimpleModList.cpp +++ b/api/logic/minecraft/SimpleModList.cpp @@ -146,6 +146,8 @@ bool SimpleModList::installMod(const QString &filename) if (type == Mod::MOD_SINGLEFILE || type == Mod::MOD_ZIPFILE || type == Mod::MOD_LITEMOD) { QString newpath = FS::PathCombine(m_dir.path(), fileinfo.fileName()); + if(QFile::exists(newpath)) + QFile::remove(newpath); if (!QFile::copy(fileinfo.filePath(), newpath)) return false; FS::updateTimestamp(newpath);