From 2177a0179e67717adfb7b00e7fddc59df6cfa8f4 Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Sun, 9 Sep 2018 00:43:24 +0200 Subject: [PATCH] parity: print correct keys path on startup (#9501) --- parity/run.rs | 8 ++++---- util/dir/src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/parity/run.rs b/parity/run.rs index f5f477379..73324aa08 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -185,7 +185,7 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc) -> Result(cmd: RunCmd, logger: Arc, on_client_rq: } //print out running parity environment - print_running_environment(&spec.name, &cmd.dirs, &db_dirs); + print_running_environment(&spec.data_dir, &cmd.dirs, &db_dirs); // display info about used pruning algorithm info!("State DB configuration: {}{}{}", @@ -926,9 +926,9 @@ fn daemonize(_pid_file: String) -> Result<(), String> { Err("daemon is no supported on windows".into()) } -fn print_running_environment(spec_name: &String, dirs: &Directories, db_dirs: &DatabaseDirectories) { +fn print_running_environment(data_dir: &str, dirs: &Directories, db_dirs: &DatabaseDirectories) { info!("Starting {}", Colour::White.bold().paint(version())); - info!("Keys path {}", Colour::White.bold().paint(dirs.keys_path(spec_name).to_string_lossy().into_owned())); + info!("Keys path {}", Colour::White.bold().paint(dirs.keys_path(data_dir).to_string_lossy().into_owned())); info!("DB path {}", Colour::White.bold().paint(db_dirs.db_root_path().to_string_lossy().into_owned())); } diff --git a/util/dir/src/lib.rs b/util/dir/src/lib.rs index cddeac78f..64b535c68 100644 --- a/util/dir/src/lib.rs +++ b/util/dir/src/lib.rs @@ -131,9 +131,9 @@ impl Directories { } /// Get the keys path - pub fn keys_path(&self, spec_name: &str) -> PathBuf { + pub fn keys_path(&self, data_dir: &str) -> PathBuf { let mut dir = PathBuf::from(&self.keys); - dir.push(spec_name); + dir.push(data_dir); dir } }