refactor: unify cache directory
This commit is contained in:
parent
d0f98c5d04
commit
85bd1a3e6c
2 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ async fn main() -> io::Result<()> {
|
||||||
logging::init_tracing();
|
logging::init_tracing();
|
||||||
|
|
||||||
// uses create_dir_all to create both .cache and serve inside it in one go
|
// 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();
|
let state = AppState::new();
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ async fn upload_to_zip(
|
||||||
) -> Result<Response, (StatusCode, String)> {
|
) -> Result<Response, (StatusCode, String)> {
|
||||||
let cache_name = util::get_random_name(10);
|
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);
|
tracing::debug!("Zipping: {:?}", &archive_path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue