From 89dd3d79ac967e26776e74b0f4db224583fee64c Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Jun 2023 11:55:11 +0200 Subject: [PATCH] fix: mkdirp lassie `temp_dir` (#257) * fix: mkdirp lassie `temp_dir` * `temp_dir` -> `lassie_temp_dir` --- daemon/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/main.rs b/daemon/main.rs index 6e8e731b..411ce951 100644 --- a/daemon/main.rs +++ b/daemon/main.rs @@ -2,6 +2,7 @@ mod args; mod state; mod station_reporter; +use std::fs; use std::path::PathBuf; use std::rc::Rc; use std::sync::Arc; @@ -40,9 +41,11 @@ async fn run(config: CliArgs) -> Result<()> { let state_file = PathBuf::from(config.state_root).join("state.json"); log::debug!("Using state file: {}", state_file.display()); + let lassie_temp_dir = PathBuf::from(config.cache_root).join("lassie"); + fs::create_dir_all(&lassie_temp_dir)?; let lassie_config = lassie::DaemonConfig { - temp_dir: Some(PathBuf::from(config.cache_root).join("lassie")), + temp_dir: Some(lassie_temp_dir), port: 0, }; let lassie_daemon = Arc::new(