summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/logic/minecraft/SimpleModList.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/logic/minecraft/SimpleModList.cpp b/api/logic/minecraft/SimpleModList.cpp
index a9fb42eb..e8583a35 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);