mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-11-29 13:32:09 +03:00
Create all parent directories for config and cache
This commit is contained in:
parent
9821beb5c4
commit
037f45f24e
@ -42,7 +42,7 @@ fn setup_logging(logpath: PathBuf, verbosity: u64) -> Result<()> {
|
|||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
let cache_dir = helix_core::cache_dir();
|
let cache_dir = helix_core::cache_dir();
|
||||||
if !cache_dir.exists() {
|
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");
|
let logpath = cache_dir.join("helix.log");
|
||||||
@ -86,7 +86,7 @@ FLAGS:
|
|||||||
|
|
||||||
let conf_dir = helix_core::config_dir();
|
let conf_dir = helix_core::config_dir();
|
||||||
if !conf_dir.exists() {
|
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")?;
|
setup_logging(logpath, args.verbosity).context("failed to initialize logging")?;
|
||||||
|
Loading…
Reference in New Issue
Block a user