From 38626cb584819857b61a86518ab23bc0113ef93b Mon Sep 17 00:00:00 2001 From: Kimbsen Date: Tue, 23 Jun 2020 16:53:49 +0200 Subject: [PATCH] don't forget the last few bytes --- weed/storage/needle/needle_parse_upload.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/weed/storage/needle/needle_parse_upload.go b/weed/storage/needle/needle_parse_upload.go index 7df0069e9..6dd61821f 100644 --- a/weed/storage/needle/needle_parse_upload.go +++ b/weed/storage/needle/needle_parse_upload.go @@ -103,9 +103,7 @@ type ChecksumReader struct { func (cr *ChecksumReader) Read(p []byte) (int, error) { n, err := cr.r.Read(p) - if err == nil { - cr.h.Write(p[:n]) - } + cr.h.Write(p[:n]) return n, err }