From d8e988d372e41a8f76f2f9619cc3ab1c3d1cfa5f Mon Sep 17 00:00:00 2001 From: LePresidente Date: Sat, 22 Dec 2018 15:46:02 +0200 Subject: encase path in quotations to support spaces in Install Location. --- src/selfupdater.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/selfupdater.cpp') diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index 7c0682bf..d26ca96c 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -327,10 +327,10 @@ void SelfUpdater::installUpdate() const QString mopath = QDir::fromNativeSeparators(qApp->property("dataPath").toString()); - const std::wstring params = L"/DIR=" + qApp->applicationDirPath().toStdWString(); + std::wstring parameters = ToWString("/DIR=\"" + qApp->applicationDirPath() + "\" "); HINSTANCE res = ::ShellExecuteW( - nullptr, L"open", m_UpdateFile.fileName().toStdWString().c_str(), params.c_str(), + nullptr, L"open", m_UpdateFile.fileName().toStdWString().c_str(), parameters.c_str(), nullptr, SW_SHOW); if (res > (HINSTANCE)32) { -- cgit v1.3.1