mirror of
https://codeberg.org/demostf/backup.git
synced 2026-06-03 09:54:18 +02:00
remove demo on error
This commit is contained in:
parent
1887843fe2
commit
d19099b827
1 changed files with 4 additions and 1 deletions
|
|
@ -22,7 +22,10 @@ impl Backup {
|
|||
|
||||
{
|
||||
let file = self.store.create(name).await?;
|
||||
demo.save(&self.client, file).await?;
|
||||
if let Err(e) = demo.save(&self.client, file).await {
|
||||
let _ = self.store.remove(name);
|
||||
return Err(e.into());
|
||||
}
|
||||
}
|
||||
|
||||
let digest = self.store.hash(name)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue