Extract filename of updateFile without leading slash
authorDominik Schmidt <dev@dominik-schmidt.de>
Wed, 13 Jun 2018 20:41:57 +0000 (22:41 +0200)
committerCamila (Rebase PR Action) <hello@camila.codes>
Tue, 24 Nov 2020 18:22:33 +0000 (18:22 +0000)
src/gui/updater/ocupdater.cpp

index dcfcaefd4c1b2e0efcca38ba3c3d79cf0a9914f1..02f01707d41638038fd3eb86e015d01a6c03a286 100644 (file)
@@ -325,7 +325,7 @@ void NSISUpdater::versionInfoArrived(const UpdateInfo &info)
             showDialog(info);
         }
         if (!url.isEmpty()) {
-            _targetFile = cfg.configPath() + url.mid(url.lastIndexOf('/'));
+            _targetFile = cfg.configPath() + url.mid(url.lastIndexOf('/')+1);
             if (QFile(_targetFile).exists()) {
                 setDownloadState(DownloadComplete);
             } else {