From 37f165d7436145b14a242f545a571e47ec310300 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 16 Oct 2020 12:53:37 -0700 Subject: [PATCH] webdav: return io.EOF when at end of a file fix https://github.com/chrislusf/seaweedfs/issues/1344 --- weed/server/webdav_server.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/weed/server/webdav_server.go b/weed/server/webdav_server.go index ee5fa5f65..86307c0cf 100644 --- a/weed/server/webdav_server.go +++ b/weed/server/webdav_server.go @@ -489,11 +489,7 @@ func (f *WebDavFile) Read(p []byte) (readSize int, err error) { glog.V(3).Infof("WebDavFileSystem.Read %v: [%d,%d)", f.name, f.off, f.off+int64(readSize)) f.off += int64(readSize) - if err == io.EOF { - err = nil - } - - if err != nil { + if err != nil && err != io.EOF { glog.Errorf("file read %s: %v", f.name, err) }