From b2e2769f63ad36b0853f269f145d92dd3e4498d5 Mon Sep 17 00:00:00 2001 From: Johannes Krainer Date: Sat, 8 Apr 2023 14:27:54 +0200 Subject: [PATCH] added nlink attribute to stat in hellofs example --- examples/hellofs/hellofs.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/hellofs/hellofs.go b/examples/hellofs/hellofs.go index e4d7687..29bdad1 100644 --- a/examples/hellofs/hellofs.go +++ b/examples/hellofs/hellofs.go @@ -40,10 +40,12 @@ func (self *Hellofs) Getattr(path string, stat *fuse.Stat_t, fh uint64) (errc in switch path { case "/": stat.Mode = fuse.S_IFDIR | 0555 + stat.Nlink = 2 return 0 case "/" + filename: stat.Mode = fuse.S_IFREG | 0444 stat.Size = int64(len(contents)) + stat.Nlink = 1 return 0 default: return -fuse.ENOENT