Skip to content

Commit 263446f

Browse files
committed
Fix file integrity check notification
1 parent 36ce616 commit 263446f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/net/clementraynaud/skoice/Updater.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ private boolean verifyFileIntegrity(File file, String expectedHash) throws NoSuc
198198
for (byte b : fileHashBytes) {
199199
fileHash.append(String.format("%02x", b));
200200
}
201-
Skoice.analyticManager().getBugsnag().notify(new IOException("File integrity check failed: expected " + expectedHash + ", got " + fileHash), Severity.WARNING);
202-
return fileHash.toString().equals(expectedHash);
201+
boolean verified = fileHash.toString().equals(expectedHash);
202+
if (!verified) {
203+
Skoice.analyticManager().getBugsnag().notify(new IOException("File integrity check failed: expected " + expectedHash + ", got " + fileHash), Severity.WARNING);
204+
}
205+
return verified;
203206
}
204207
}

0 commit comments

Comments
 (0)