Remove trailing slash on wallet_path

This commit is contained in:
Jacob Brydolf
2016-10-17 21:42:26 +02:00
parent fc2a086aba
commit 9cc3dee472
2 changed files with 153 additions and 0 deletions

View File

@@ -111,10 +111,16 @@ Rectangle {
console.log("Here we apply the settings");
// here we need to actually move wallet to the new location
// Remove trailing slash - (default on windows and mac)
if (settings.wallet_path.substring(settings.wallet_path.length -1) === "/"){
settings.wallet_path = settings.wallet_path.substring(0,settings.wallet_path.length -1)
}
var new_wallet_filename = settings.wallet_path + "/"
+ settings.account_name + "/"
+ settings.account_name;
console.log("saving to wizard: "+ new_wallet_filename)
// moving wallet files to the new destination, if user changed it
if (new_wallet_filename !== settings.wallet_filename) {
// using previously saved wallet;