Skip to content

Commit

Permalink
Fix setting install path on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
DolceTriade committed May 29, 2017
1 parent b4d57d0 commit ded5dd9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Settings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ Item {
id: fileDialog
title: "Please choose a folder"
onAccepted: {
updaterSettings.installPath = Qt.resolvedUrl(fileDialog.fileUrl).substring('file://'.length);
updaterSettings.currentVersion = "";
updaterSettings.installFinished = false
var clipLength = 'file://'.length;
// On Windows, apparently, there are three slashes. Increment
// the substring clip length as a result.
if (Qt.platform.os === "windows") {
clipLength += 1;
}
updaterSettings.installPath = Qt.resolvedUrl(fileDialog.fileUrl).substring(clipLength);
}
selectFolder: true
}
Expand Down

0 comments on commit ded5dd9

Please sign in to comment.