Skip to content

Commit

Permalink
fix/win: windows read error (#5126)
Browse files Browse the repository at this point in the history
Signed-off-by: jiefenghuang <jiefeng@juicedata.io>
  • Loading branch information
jiefenghuang authored Sep 2, 2024
1 parent 77506fb commit 6705817
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/vfs/vfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ func (v *VFS) Read(ctx Context, ino Ino, buf []byte, off uint64, fh uint64) (n i
}

// there could be read operation for write-only if kernel writeback is enabled
if !v.Conf.FuseOpts.EnableWriteback && !hasReadPerm(h.flags) {
if v.Conf.FuseOpts != nil && !v.Conf.FuseOpts.EnableWriteback && !hasReadPerm(h.flags) {
err = syscall.EBADF
return
}
Expand Down

0 comments on commit 6705817

Please sign in to comment.