Fixed --datadir option (#5697)

* Fixed --datadir

* Removed evmbin lib
This commit is contained in:
Arkadiy Paronyan 2017-05-29 15:15:54 +02:00 committed by Gav Wood
parent 3991178b8d
commit a4aec56d18
2 changed files with 2 additions and 6 deletions

View File

@ -4,10 +4,6 @@ description = "Parity's EVM implementation"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
[lib]
name = "evmbin"
path = "./src/main.rs"
[[bin]]
name = "parity-evm"
path = "./src/main.rs"

View File

@ -881,8 +881,8 @@ impl Configuration {
use path;
let local_path = default_local_path();
let base_path = self.args.flag_base_path.as_ref().map_or_else(|| default_data_path(), |s| s.clone());
let data_path = replace_home("", self.args.flag_datadir.as_ref().unwrap_or(&base_path));
let base_path = self.args.flag_base_path.as_ref().or_else(|| self.args.flag_datadir.as_ref()).map_or_else(|| default_data_path(), |s| s.clone());
let data_path = replace_home("", &base_path);
let base_db_path = if self.args.flag_base_path.is_some() && self.args.flag_db_path.is_none() {
// If base_path is set and db_path is not we default to base path subdir instead of LOCAL.
"$BASE/chains"