diff --git a/js/Wizard.js b/js/Wizard.js index d6df15ae..6207cf03 100644 --- a/js/Wizard.js +++ b/js/Wizard.js @@ -83,10 +83,10 @@ function walletPathExists(accountsDir, directory, filename, isIOS, walletManager return false; } -function unusedWalletName(directory, filename, walletManager) { +function unusedWalletName(directory, filename, isIOS, walletManager) { for (var i = 0; i < 100; i++) { var walletName = filename + (i > 0 ? "_" + i : ""); - if (!walletManager.walletExists(directory + "/" + walletName + "/" + walletName)) { + if (!walletPathExists(directory, directory, walletName, isIOS, walletManager)) { return walletName; } } diff --git a/wizard/WizardWalletInput.qml b/wizard/WizardWalletInput.qml index c4b31b85..067f627b 100644 --- a/wizard/WizardWalletInput.qml +++ b/wizard/WizardWalletInput.qml @@ -58,7 +58,7 @@ GridLayout { walletName.error = !walletName.verify(); walletLocation.error = !walletLocation.verify(); walletLocation.text = appWindow.accountsDir; - walletName.text = Wizard.unusedWalletName(appWindow.accountsDir, defaultAccountName, walletManager); + walletName.text = Wizard.unusedWalletName(appWindow.accountsDir, defaultAccountName, isIOS, walletManager); } MoneroComponents.LineEdit {