fix: return EOF instead of EIO on read past end of file
This commit is contained in:
parent
7368b4cfe4
commit
c366cee82c
|
|
@ -142,8 +142,8 @@ func (f *p9File) Read(ctx context.Context, fh fs.FileHandle, dest []byte, off in
|
|||
}
|
||||
}
|
||||
n, err := fid.Read(dest)
|
||||
if err != nil && n == 0 {
|
||||
return nil, syscall.EIO
|
||||
if n == 0 {
|
||||
return fuse.ReadResultData(nil), 0
|
||||
}
|
||||
return fuse.ReadResultData(dest[:n]), 0
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue