From 781e53cccbd1c90789a89f4c4883c50e8e644150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 12 Jan 2016 06:52:29 +0100 Subject: GH-1402 add a hack for updater to respect renamed binary on Windows --- application/MultiMC.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'application') diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp index fb82510d..d5779321 100644 --- a/application/MultiMC.cpp +++ b/application/MultiMC.cpp @@ -720,6 +720,13 @@ void MultiMC::installUpdates(const QString updateFilesDir, GoUpdate::OperationLi // replace = move original out to backup, if it exists, move the new file in its place case GoUpdate::Operation::OP_REPLACE: { +#ifdef Q_OS_WIN32 + // hack for people renaming the .exe because ... reasons :) + if(op.dest == "MultiMC.exe") + { + op.dest = QFileInfo(applicationFilePath()).fileName(); + } +#endif QFileInfo replaced (FS::PathCombine(root(), op.dest)); #ifdef Q_OS_WIN32 if(QSysInfo::windowsVersion() < QSysInfo::WV_VISTA) -- cgit v1.2.3