From 0534b5813bcc1af0b8b44895fccb7af4df31848b Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Wed, 21 Jan 2026 15:58:46 -0700 Subject: [PATCH] ignore missing package archive on 035 migration --- core/src/version/v0_3_6_alpha_0.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/version/v0_3_6_alpha_0.rs b/core/src/version/v0_3_6_alpha_0.rs index cae4e917e..d1d3d4242 100644 --- a/core/src/version/v0_3_6_alpha_0.rs +++ b/core/src/version/v0_3_6_alpha_0.rs @@ -277,7 +277,12 @@ impl VersionT for Version { /// MUST be idempotent, and is run after *all* db migrations async fn post_up(self, ctx: &RpcContext, input: Value) -> Result<(), Error> { let path = Path::new(formatcp!("{PACKAGE_DATA}/archive/")); - if !path.is_dir() { + let metadata = tokio::fs::metadata(path).await; + if metadata.is_err() { + // Treat non-existent archive directory as empty + return Ok(()); + } + if !metadata.unwrap().is_dir() { return Err(Error::new( eyre!( "expected path ({}) to be a directory",