diff --git a/src/main.rs b/src/main.rs index b11c713..91d0482 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ async fn main() -> io::Result<()> { logging::init_tracing(); // uses create_dir_all to create both .cache and serve inside it in one go - util::make_dir(".cache/serve").await?; + util::make_dir(&*CACHE_DIR).await?; let state = AppState::new(); diff --git a/src/router/upload.rs b/src/router/upload.rs index d3d5ace..1d99763 100644 --- a/src/router/upload.rs +++ b/src/router/upload.rs @@ -32,7 +32,7 @@ async fn upload_to_zip( ) -> Result { let cache_name = util::get_random_name(10); - let archive_path = Path::new(".cache/serve").join(&cache_name); + let archive_path = crate::CACHE_DIR.join(&cache_name); tracing::debug!("Zipping: {:?}", &archive_path);