|
|
@ -76,9 +76,15 @@ async fn process_mock(state: Arc<state::State>, file: String)
|
|
|
|
|
|
|
|
|
|
|
|
async fn process(state: Arc<state::State>, file: String) -> eyre::Result<()>
|
|
|
|
async fn process(state: Arc<state::State>, file: String) -> eyre::Result<()>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
delete::process(state, &file).await
|
|
|
|
let path = std::path::Path::new(&file);
|
|
|
|
.wrap_err(eyre!("Processing failed"))
|
|
|
|
if !path.exists() {
|
|
|
|
.with_section(move || file.header("Root path was"))?;
|
|
|
|
error!("{:?} does not exist, skipping", path);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
info!("{:?} Processing", path);
|
|
|
|
|
|
|
|
delete::process(state, path).await
|
|
|
|
|
|
|
|
.wrap_err(eyre!("Processing failed"))
|
|
|
|
|
|
|
|
.with_section(move || file.header("Root path was"))?;
|
|
|
|
|
|
|
|
}
|
|
|
|
Ok(())
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|