mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 05:52:20 +08:00
fuse/ipns, fuse/readonly: Let the fuse library set defaults for Attr
Without this, all entries will have nlink==0, which confuses a bunch of tools. Most dramatically, systemd-nspawn enters a busy loop in its lock utility function. License: MIT Signed-off-by: Tommi Virtanen <tv@eagain.net>
This commit is contained in:
@ -46,7 +46,7 @@ type Root struct {
|
||||
|
||||
// Attr returns file attributes.
|
||||
func (*Root) Attr(ctx context.Context, a *fuse.Attr) error {
|
||||
*a = fuse.Attr{Mode: os.ModeDir | 0111} // -rw+x
|
||||
a.Mode = os.ModeDir | 0111 // -rw+x
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -118,7 +118,6 @@ func (s *Node) Attr(ctx context.Context, a *fuse.Attr) error {
|
||||
a.Size = uint64(len(s.cached.GetData()))
|
||||
a.Uid = uint32(os.Getuid())
|
||||
a.Gid = uint32(os.Getgid())
|
||||
|
||||
default:
|
||||
return fmt.Errorf("Invalid data type - %s", s.cached.GetType())
|
||||
}
|
||||
|
Reference in New Issue
Block a user