From 01743b229951f9eb9a07c2b5dd3f59ff40f735aa Mon Sep 17 00:00:00 2001 From: Martin Honermeyer Date: Tue, 23 Mar 2021 18:07:55 +0100 Subject: [PATCH] Do not try to get xattrs for the root inode Otherwise the path in the S3 request is empty, which is invalid. --- internal/goofys.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/goofys.go b/internal/goofys.go index b78d215e..bc90187d 100644 --- a/internal/goofys.go +++ b/internal/goofys.go @@ -462,11 +462,15 @@ func (fs *Goofys) GetXattr(ctx context.Context, func (fs *Goofys) ListXattr(ctx context.Context, op *fuseops.ListXattrOp) (err error) { + var xattrs []string + fs.mu.RLock() inode := fs.getInodeOrDie(op.Inode) fs.mu.RUnlock() - xattrs, err := inode.ListXattr() + if inode.Id != 1 { + xattrs, err = inode.ListXattr() + } ncopied := 0