go directly to installer if datadir empty
This commit is contained in:
parent
501dce4372
commit
ca583cd847
@ -334,7 +334,12 @@ impl Config {
|
|||||||
Err(ConfigError::NotFound) => Ok(Config::Install(datadir_path, network)),
|
Err(ConfigError::NotFound) => Ok(Config::Install(datadir_path, network)),
|
||||||
Err(e) => Err(format!("Failed to read configuration file: {}", e).into()),
|
Err(e) => Err(format!("Failed to read configuration file: {}", e).into()),
|
||||||
}
|
}
|
||||||
} else if !datadir_path.exists() {
|
} else if !datadir_path.exists()
|
||||||
|
|| (!datadir_path.join("bitcoin").exists()
|
||||||
|
&& !datadir_path.join("testnet").exists()
|
||||||
|
&& !datadir_path.join("signet").exists()
|
||||||
|
&& !datadir_path.join("regtest").exists())
|
||||||
|
{
|
||||||
Ok(Config::Install(datadir_path, bitcoin::Network::Bitcoin))
|
Ok(Config::Install(datadir_path, bitcoin::Network::Bitcoin))
|
||||||
} else {
|
} else {
|
||||||
Ok(Config::Launcher(datadir_path))
|
Ok(Config::Launcher(datadir_path))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user