Browse Source

webdav: return io.EOF when at end of a file

fix https://github.com/chrislusf/seaweedfs/issues/1344
pull/1547/head
Chris Lu 4 years ago
parent
commit
37f165d743
  1. 6
      weed/server/webdav_server.go

6
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)
}

Loading…
Cancel
Save