From 4522c5ecfd5dbaf78d47584208c3fd28fa317114 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Fri, 23 Sep 2022 10:03:35 -0600 Subject: [PATCH] ignore file not found error for delete --- backend/src/init.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/init.rs b/backend/src/init.rs index abeb0877f..fad3909d4 100644 --- a/backend/src/init.rs +++ b/backend/src/init.rs @@ -324,7 +324,11 @@ pub async fn init(cfg: &RpcContextConfig) -> Result { crate::version::init(&mut handle, &receipts).await?; if should_rebuild { - tokio::fs::remove_file(SYSTEM_REBUILD_PATH).await?; + match tokio::fs::remove_file(SYSTEM_REBUILD_PATH).await { + Ok(()) => Ok(()), + Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()), + Err(e) => Err(e), + }?; } tracing::info!("System initialized.");