2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-10 06:25:00 +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() { if HashRepo::create(repo, hash.to_vec().into()).await?.is_err() {
// duplicate upload // duplicate upload
store.remove(identifier).await?; store.remove(identifier).await?;
session.identifier.take();
return Ok(()); return Ok(());
} }