parent
b078d71293
commit
1b36a2cd87
@ -552,10 +552,10 @@ impl Configuration {
|
|||||||
let dapps_path = replace_home(&self.args.flag_dapps_path);
|
let dapps_path = replace_home(&self.args.flag_dapps_path);
|
||||||
let signer_path = replace_home(&self.args.flag_signer_path);
|
let signer_path = replace_home(&self.args.flag_signer_path);
|
||||||
|
|
||||||
if self.args.flag_geth {
|
if self.args.flag_geth && !cfg!(windows) {
|
||||||
let geth_path = path::ethereum::default();
|
let geth_root = if self.args.flag_testnet { path::ethereum::test() } else { path::ethereum::default() };
|
||||||
::std::fs::create_dir_all(geth_path.as_path()).unwrap_or_else(
|
::std::fs::create_dir_all(geth_root.as_path()).unwrap_or_else(
|
||||||
|e| warn!("Failed to create '{}' for geth mode: {}", &geth_path.to_str().unwrap(), e));
|
|e| warn!("Failed to create '{}' for geth mode: {}", &geth_root.to_str().unwrap(), e));
|
||||||
}
|
}
|
||||||
|
|
||||||
Directories {
|
Directories {
|
||||||
|
@ -62,6 +62,13 @@ pub mod ethereum {
|
|||||||
/// Default path for ethereum installation on Mac Os
|
/// Default path for ethereum installation on Mac Os
|
||||||
pub fn default() -> PathBuf { super::config_path("Ethereum") }
|
pub fn default() -> PathBuf { super::config_path("Ethereum") }
|
||||||
|
|
||||||
|
/// Default path for ethereum installation (testnet)
|
||||||
|
pub fn test() -> PathBuf {
|
||||||
|
let mut path = default();
|
||||||
|
path.push("testnet");
|
||||||
|
path
|
||||||
|
}
|
||||||
|
|
||||||
/// Get the specific folder inside default ethereum installation
|
/// Get the specific folder inside default ethereum installation
|
||||||
pub fn with_default(s: &str) -> PathBuf {
|
pub fn with_default(s: &str) -> PathBuf {
|
||||||
let mut path = default();
|
let mut path = default();
|
||||||
|
Loading…
Reference in New Issue
Block a user