summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-01-12 06:52:29 +0100
committerPetr Mrázek <peterix@gmail.com>2016-01-12 06:52:29 +0100
commit781e53cccbd1c90789a89f4c4883c50e8e644150 (patch)
tree12fad7c5534b9482eb7f2fd74cfd417c4f7a0239 /application
parent25991c36afd0e0c93a05f4a8b481fceb9abb0ca7 (diff)
downloadMultiMC-781e53cccbd1c90789a89f4c4883c50e8e644150.tar
MultiMC-781e53cccbd1c90789a89f4c4883c50e8e644150.tar.gz
MultiMC-781e53cccbd1c90789a89f4c4883c50e8e644150.tar.lz
MultiMC-781e53cccbd1c90789a89f4c4883c50e8e644150.tar.xz
MultiMC-781e53cccbd1c90789a89f4c4883c50e8e644150.zip
GH-1402 add a hack for updater to respect renamed binary on Windows
Diffstat (limited to 'application')
-rw-r--r--application/MultiMC.cpp7
1 files changed, 7 insertions, 0 deletions
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)