Skip to content

Commit ded5dd9

Browse files
committed
Fix setting install path on Windows
1 parent b4d57d0 commit ded5dd9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Settings.qml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ Item {
5353
id: fileDialog
5454
title: "Please choose a folder"
5555
onAccepted: {
56-
updaterSettings.installPath = Qt.resolvedUrl(fileDialog.fileUrl).substring('file://'.length);
57-
updaterSettings.currentVersion = "";
58-
updaterSettings.installFinished = false
56+
var clipLength = 'file://'.length;
57+
// On Windows, apparently, there are three slashes. Increment
58+
// the substring clip length as a result.
59+
if (Qt.platform.os === "windows") {
60+
clipLength += 1;
61+
}
62+
updaterSettings.installPath = Qt.resolvedUrl(fileDialog.fileUrl).substring(clipLength);
5963
}
6064
selectFolder: true
6165
}

0 commit comments

Comments
 (0)