MSI: Fix crash in the auto updater
authorOlivier Goffart <ogoffart@woboq.com>
Tue, 7 Aug 2018 07:50:55 +0000 (09:50 +0200)
committerCamila (Rebase PR Action) <hello@camila.codes>
Tue, 24 Nov 2020 18:22:33 +0000 (18:22 +0000)
'auto' here is a QStringBuilder referencing a temporary

Ammend commit 150d4f5935c9480cae0a84506af4efa940b64095
(MSI: Always with logfile #6609)

Found in the crash reporter:
https://sentry.io/owncloud/desktop-win-and-mac/issues/623245771/

src/gui/updater/ocupdater.cpp

index 62514a5ce20f605c8986a981ad55ca43eb91974e..b55e73ee5e21754ce19945d8d198d1fd1d0b2dae 100644 (file)
@@ -208,7 +208,7 @@ void OCUpdater::slotStartInstaller()
             return QDir::toNativeSeparators(path);
         };
 
-        auto msiLogFile = cfg.configPath() + "msi.log";
+        QString msiLogFile = cfg.configPath() + "msi.log";
         QString command = QString("&{msiexec /norestart /passive /i '%1' /L*V '%2'| Out-Null ; &'%3'}")
              .arg(preparePathForPowershell(updateFile))
              .arg(preparePathForPowershell(msiLogFile))