fix: return EOF instead of EIO on read past end of file

This commit is contained in:
Levi Neely 2026-05-19 15:52:25 +02:00
parent 7368b4cfe4
commit c366cee82c
1 changed files with 2 additions and 2 deletions

View File

@ -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
}