GH-1402 add a hack for updater to respect renamed binary on Windows
This commit is contained in:
parent
25991c36af
commit
781e53cccb
@ -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
|
// replace = move original out to backup, if it exists, move the new file in its place
|
||||||
case GoUpdate::Operation::OP_REPLACE:
|
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));
|
QFileInfo replaced (FS::PathCombine(root(), op.dest));
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
if(QSysInfo::windowsVersion() < QSysInfo::WV_VISTA)
|
if(QSysInfo::windowsVersion() < QSysInfo::WV_VISTA)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user