Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fixed --base-path on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
arkpar committed Jan 17, 2017
1 parent f0eab33 commit cfe5a82
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions parity/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use helpers::{to_duration, to_mode, to_block_id, to_u256, to_pending_set, to_pri
geth_ipc_path, parity_ipc_path, to_bootnodes, to_addresses, to_address, to_gas_limit, to_queue_strategy};
use params::{ResealPolicy, AccountsConfig, GasPricerConfig, MinerExtras};
use ethcore_logger::Config as LogConfig;
use dir::{Directories, default_hypervisor_path, default_local_path};
use dir::{self, Directories, default_hypervisor_path, default_local_path, default_data_path};
use dapps::Configuration as DappsConfiguration;
use signer::{Configuration as SignerConfiguration};
use updater::{UpdatePolicy, UpdateFilter, ReleaseTrack};
Expand Down Expand Up @@ -736,11 +736,10 @@ impl Configuration {
let local_path = default_local_path();
let data_path = replace_home("", self.args.flag_datadir.as_ref().unwrap_or(&self.args.flag_base_path));

let db_path = if self.args.flag_datadir.is_some() {
replace_home(&data_path, &self.args.flag_db_path)
} else {
replace_home_for_db(&data_path, &local_path, &self.args.flag_db_path)
};
//TODO: refactor this for better detection if base_path is custom.
let base_db_path = if data_path != default_data_path() && self.args.flag_db_path == dir::CHAINS_PATH { "$BASE/chains".to_owned() } else { self.args.flag_db_path.clone() };

let db_path = replace_home_for_db(&data_path, &local_path, &base_db_path);
let keys_path = replace_home(&data_path, &self.args.flag_keys_path);
let dapps_path = replace_home(&data_path, &self.args.flag_dapps_path);
let ui_path = replace_home(&data_path, &self.args.flag_ui_path);
Expand Down

0 comments on commit cfe5a82

Please sign in to comment.