From 2bc2cab02db248656a97edc7cd12fdcdb387273a Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Fri, 2 Jun 2023 16:17:23 +0200 Subject: [PATCH] add more logging context, try cleaning up target on restore --- src/docbuilder/caching.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/docbuilder/caching.rs b/src/docbuilder/caching.rs index ab8f2161b..d8a68dba5 100644 --- a/src/docbuilder/caching.rs +++ b/src/docbuilder/caching.rs @@ -178,8 +178,9 @@ impl ArtifactCache { return Ok(()); } - self.ensure_cache_exists()?; + fs::create_dir_all(target_dir.parent().unwrap())?; fs::rename(cache_dir, target_dir).context("could not move cache directory to target")?; + self.cleanup(target_dir)?; Ok(()) }