diff options
author | Wojciech Kępka | 2021-06-07 15:49:02 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-07 16:07:30 +0000 |
commit | 037f45f24e8efdc4a5fd3836d9db1c6170301306 (patch) | |
tree | 7238b15eb1daa16b7fc35176fa9c6afb04d2fcf1 | |
parent | 9821beb5c4b36f7c34ae6a5cb014b3eb68b9233a (diff) |
Create all parent directories for config and cache
-rw-r--r-- | helix-term/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs index ea9ed804..9d4e1c5b 100644 --- a/helix-term/src/main.rs +++ b/helix-term/src/main.rs @@ -42,7 +42,7 @@ fn setup_logging(logpath: PathBuf, verbosity: u64) -> Result<()> { async fn main() -> Result<()> { let cache_dir = helix_core::cache_dir(); if !cache_dir.exists() { - std::fs::create_dir(&cache_dir).ok(); + std::fs::create_dir_all(&cache_dir).ok(); } let logpath = cache_dir.join("helix.log"); @@ -86,7 +86,7 @@ FLAGS: let conf_dir = helix_core::config_dir(); if !conf_dir.exists() { - std::fs::create_dir(&conf_dir).ok(); + std::fs::create_dir_all(&conf_dir).ok(); } setup_logging(logpath, args.verbosity).context("failed to initialize logging")?; |