Verified Commit 48a0f446 authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Fix EOF error handling

parent 400e43e3
Pipeline #8054 passed with stage
in 18 seconds
......@@ -76,11 +76,11 @@ func ComputeHash(device string) {
n, err := io.ReadFull(r, b[:cap(b)])
if err != nil {
if err == io.EOF {
if n != 0 {
log.Fatalf("Read %d bytes after EOF\n", n)
}
break
}
if n != 0 {
log.Fatalf("Read %d bytes after EOF\n", n)
}
if err != io.ErrUnexpectedEOF {
// Ignore if last read does not fill buffer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment