refactor: unify cache directory

This commit is contained in:
Zynh Ludwig 2024-12-27 03:05:12 -08:00
parent d0f98c5d04
commit 85bd1a3e6c
2 changed files with 2 additions and 2 deletions

View file

@ -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();

View file

@ -32,7 +32,7 @@ async fn upload_to_zip(
) -> Result<Response, (StatusCode, String)> {
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);