dont die on missing files

This commit is contained in:
Robin Appelman 2026-02-12 00:15:06 +01:00
commit 74a6f35106

View file

@ -50,17 +50,18 @@ async fn main() -> Result<(), MainError> {
.trim_start_matches("demos/"), .trim_start_matches("demos/"),
); );
if !path.exists() {
error!(path = ?path, "Demo not found");
break;
}
info!("removing"); info!("removing");
client client
.set_url(demo.id, "deleted", "", "", demo.hash, &api_key) .set_url(demo.id, "deleted", "", "", demo.hash, &api_key)
.await?; .await?;
remove_file(&path)?;
info!("{} {}", demo.id, demo.name);
if !path.exists() {
error!(path = ?path, "File not found");
} else {
remove_file(&path)?;
info!(name = demo.name, "removed");
}
} }
Ok(()) Ok(())