From 0d1df5ebc22fab979a8175e769df838eef376e20 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 23 Jun 2023 11:43:15 -0500 Subject: [PATCH] Avoid failed identifier cleanup on failed duplicate upload --- src/ingest.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ingest.rs b/src/ingest.rs index fa34cbd..47a2878 100644 --- a/src/ingest.rs +++ b/src/ingest.rs @@ -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(()); }