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

Commit

Permalink
Merge pull request #1896 from ethcore/fix-geth-2
Browse files Browse the repository at this point in the history
Autocreating geth dir if none and geth mode on
  • Loading branch information
rphmeier authored Aug 9, 2016
2 parents 7f5c178 + 26ff6af commit 4efddb9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions parity/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ impl Configuration {
}

fn directories(&self) -> Directories {
use util::path;

let db_path = replace_home(self.args.flag_datadir.as_ref().unwrap_or(&self.args.flag_db_path));

let keys_path = replace_home(
Expand All @@ -524,6 +526,12 @@ impl Configuration {
let dapps_path = replace_home(&self.args.flag_dapps_path);
let signer_path = replace_home(&self.args.flag_signer_path);

if self.args.flag_geth {
let geth_path = path::ethereum::default();
::std::fs::create_dir_all(geth_path.as_path()).unwrap_or_else(
|e| warn!("Failed to create '{}' for geth mode: {}", &geth_path.to_str().unwrap(), e));
}

Directories {
keys: keys_path,
db: db_path,
Expand Down

0 comments on commit 4efddb9

Please sign in to comment.