diff --git a/cmd/mount/file.go b/cmd/mount/file.go index 4bc7c3d45..2a13feb63 100644 --- a/cmd/mount/file.go +++ b/cmd/mount/file.go @@ -74,7 +74,7 @@ func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR } // If size unknown then use direct io to read - if handle.Node().DirEntry().Size() < 0 { + if entry := handle.Node().DirEntry(); entry != nil && entry.Size() < 0 { resp.Flags |= fuse.OpenDirectIO }