Skip to content

Commit

Permalink
Fix: don't log if file did not previously exist when computing checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
Gegy committed Jul 22, 2023
1 parent 736294d commit ad23212
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class FileChecksumValidator {

@Nullable
public static HashCode computeChecksumFor(Path file) {
if (!Files.exists(file)) {
return null;
}
Hasher hasher = Hashing.sha256().newHasher();
ByteBuffer buffer = ByteBuffer.allocate(1024);
try (SeekableByteChannel channel = Files.newByteChannel(file)) {
Expand Down

0 comments on commit ad23212

Please sign in to comment.