replacing /home/nikky also

This commit is contained in:
NikVolf 2016-04-06 14:21:19 +03:00 committed by arkpar
parent c5553c1f21
commit 4ed15931af

View File

@ -353,7 +353,7 @@ impl Configuration {
}
}
fn _keys_path(&self) -> String {
fn keys_path(&self) -> String {
self.args.flag_keys_path.replace("$HOME", env::home_dir().unwrap().to_str().unwrap())
}
@ -475,7 +475,7 @@ impl Configuration {
fn execute_account_cli(&self) {
use util::keys::store::SecretStore;
use rpassword::read_password;
let mut secret_store = SecretStore::new_in(Path::new(&self.args.flag_keys_path));
let mut secret_store = SecretStore::new_in(Path::new(&self.keys_path()));
if self.args.cmd_new {
println!("Please note that password is NOT RECOVERABLE.");
println!("Type password: ");
@ -508,7 +508,8 @@ impl Configuration {
.collect::<Vec<_>>()
.into_iter()
}).collect::<Vec<_>>();
let account_service = AccountService::new_in(Path::new(&self.args.flag_keys_path));
let account_service = AccountService::new_in(Path::new(&self.keys_path()));
for d in &self.args.flag_unlock {
let a = Address::from_str(clean_0x(&d)).unwrap_or_else(|_| {
die!("{}: Invalid address for --unlock. Must be 40 hex characters, without the 0x at the beginning.", d)