Permalink
Browse files

GH-2384 Replace existing mod files

  • Loading branch information...
Janrupf authored and peterix committed Nov 8, 2018
1 parent 3d630c7 commit 16df8d7b883f10239a961997ba8ff123100ebfae
Showing with 2 additions and 0 deletions.
  1. +2 −0 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);

0 comments on commit 16df8d7

Please sign in to comment.