summary refs log tree commit diff
diff options
context:
space:
mode:
authoredef <edef@unfathomable.blue>2022-04-12 19:24:12 +0000
committeredef <edef@unfathomable.blue>2022-04-12 20:02:38 +0000
commit6c16292991728f5c612caabad3f06e047de47b39 (patch)
treef3ef504c8f12353b5c62220f21d749e8515efecc
parentfec77c4fa95f9c4684796c3b4e60bddaaa128fd2 (diff)
downloadunf-legacy-6c16292991728f5c612caabad3f06e047de47b39.tar.zst
ripple/fossil: correctly handle the empty blob
Change-Id: I6a91a998063e70ec92e8239361a37e3f8033b049
-rw-r--r--ripple/fossil/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/ripple/fossil/src/lib.rs b/ripple/fossil/src/lib.rs
index 008240a..6576847 100644
--- a/ripple/fossil/src/lib.rs
+++ b/ripple/fossil/src/lib.rs
@@ -108,11 +108,10 @@ impl Store {
 			buffer.extend_from_slice(&chunk);
 		}
 
-		if buffer.is_empty() {
-			panic!("blob not found");
-		}
-
 		if h.finalize() != r#ref {
+			if buffer.is_empty() {
+				panic!("blob not found");
+			}
 			panic!("hash mismatch");
 		}