always use native directory separators in paths

This commit is contained in:
xiphon
2020-04-24 00:43:40 +00:00
parent 585fb2810d
commit a99eef68f5
10 changed files with 35 additions and 42 deletions

View File

@@ -371,7 +371,7 @@ Rectangle {
persistentSettings.locale = wizardController.language_locale
persistentSettings.account_name = wizardController.walletOptionsName
persistentSettings.wallet_path = new_wallet_filename
persistentSettings.wallet_path = wizardController.m_wallet.path;
persistentSettings.restore_height = (isNaN(walletOptionsRestoreHeight))? 0 : walletOptionsRestoreHeight
persistentSettings.allow_background_mining = false

View File

@@ -119,7 +119,7 @@ Rectangle {
delegate: Rectangle {
// inherited roles from walletKeysFilesModel:
// index, modified, accessed, path, networktype, address
// index, fileName, modified, accessed, path, networktype, address
id: item
height: flow.itemHeight
width: {
@@ -133,11 +133,6 @@ Rectangle {
else if(networktype === 2) return qsTr("Stagenet");
return "";
}
property string fileName: {
var spl = path.split("/");
return spl[spl.length - 1].replace(".keys", "");
}
property string filePath: { return path }
color: "transparent"
Rectangle {
@@ -202,9 +197,9 @@ Rectangle {
text: {
// truncate on window width
var maxLength = wizardController.layoutScale <= 1 ? 12 : 16
if(item.fileName.length > maxLength)
return item.fileName.substring(0, maxLength) + "...";
return item.fileName;
if (fileName.length > maxLength)
return fileName.substring(0, maxLength) + "...";
return fileName;
}
Layout.preferredHeight: 26
@@ -270,7 +265,7 @@ Rectangle {
onClicked: {
persistentSettings.nettype = parseInt(networktype)
wizardController.openWalletFile(item.filePath);
wizardController.openWalletFile(path);
}
}
}

View File

@@ -55,7 +55,7 @@ GridLayout {
function reset() {
walletName.error = !walletName.verify();
walletLocation.error = walletLocation.text === "";
walletLocation.text = moneroAccountsDir + "/";
walletLocation.text = moneroAccountsDir;
walletName.text = defaultAccountName;
}