Skip to content

Commit

Permalink
ignore file not found error for delete (#1822)
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bonez authored Sep 23, 2022
1 parent 8b794c2 commit c85491c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@ pub async fn init(cfg: &RpcContextConfig) -> Result<InitResult, Error> {
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.");
Expand Down

0 comments on commit c85491c

Please sign in to comment.