diff --git a/weed/filer/reader_at.go b/weed/filer/reader_at.go index fa51df687..461ef2b2c 100644 --- a/weed/filer/reader_at.go +++ b/weed/filer/reader_at.go @@ -58,6 +58,10 @@ func LookupFn(filerClient filer_pb.FilerClient) LookupFileIdFunctionType { }) } + if err != nil { + return nil, err + } + for _, loc := range locations.Locations { volumeServerAddress := filerClient.AdjustedUrl(loc.Url) targetUrl := fmt.Sprintf("http://%s/%s", volumeServerAddress, fileId) diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 660bbf076..e1524f939 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -79,7 +79,7 @@ func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fus if err != nil { glog.Warningf("file handle read %s %d: %v", fh.f.fullpath(), totalRead, err) - return nil + return fuse.EIO } if totalRead > int64(len(buff)) {