Add first changes to validator CLI

This commit is contained in:
Paul Hauner
2019-09-01 19:33:43 +10:00
parent fa6ba51eb7
commit 4a69d01a37
4 changed files with 331 additions and 74 deletions

View File

@@ -89,6 +89,8 @@ impl Config {
}
/// Returns the core path for the client.
///
/// Creates the directory if it does not exist.
pub fn data_dir(&self) -> Option<PathBuf> {
let path = dirs::home_dir()?.join(&self.data_dir);
fs::create_dir_all(&path).ok()?;