Merge pull request #3395

d60bbb7 Wizard: use endsWith, fix todo (selsta)
This commit is contained in:
luigi1111 2021-04-16 12:55:37 -05:00
commit c47332e2f1
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -69,10 +69,7 @@ function walletPathExists(accountsDir, directory, filename, isIOS, walletManager
if(!filename || filename === "") return false; if(!filename || filename === "") return false;
if(!directory || directory === "") return false; if(!directory || directory === "") return false;
// make sure directory endswith path seperator if (!directory.endsWith("/") && !directory.endsWith("\\"))
// @TODO: use .endswith() after Qt 5.8
var trailing_path_sep = directory[directory.length-1];
if(trailing_path_sep !== "/" && trailing_path_sep !== "\\")
directory += "/" directory += "/"
if(isIOS) if(isIOS)