2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 19:31:35 +00:00

Avoid failed identifier cleanup on failed duplicate upload

This commit is contained in:
asonix 2023-06-23 11:43:15 -05:00
parent 7ba2fc9b26
commit 0d1df5ebc2

View file

@ -118,6 +118,7 @@ where
if HashRepo::create(repo, hash.to_vec().into()).await?.is_err() {
// duplicate upload
store.remove(identifier).await?;
session.identifier.take();
return Ok(());
}