From 458ab0182293e87a1a107e830c09b51830d8c585 Mon Sep 17 00:00:00 2001 From: Szum123321 Date: Tue, 29 Nov 2022 22:35:15 +0100 Subject: [PATCH] potential bug repair --- .../textile_backup/core/digest/HashingInputStream.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/szum123321/textile_backup/core/digest/HashingInputStream.java b/src/main/java/net/szum123321/textile_backup/core/digest/HashingInputStream.java index 2f51eb0..6a31343 100644 --- a/src/main/java/net/szum123321/textile_backup/core/digest/HashingInputStream.java +++ b/src/main/java/net/szum123321/textile_backup/core/digest/HashingInputStream.java @@ -71,11 +71,11 @@ public class HashingInputStream extends FilterInputStream { @Override public void close() throws IOException { + latch.countDown(); + if(in.available() == 0) hashBuilder.update(path, hasher.getValue()); else brokenFileHandler.handle(path, new DataLeftException(in.available())); - latch.countDown(); - super.close(); } }