mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
GH-2384 Replace existing mod files
This commit is contained in:
parent
3d630c7856
commit
16df8d7b88
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue