Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions internal/goofys.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ import (
"github.com/jacobsa/fuse/fuseops"
"github.com/jacobsa/fuse/fuseutil"

"github.com/sirupsen/logrus"
"net/http"

"github.com/sirupsen/logrus"
)

// goofys is a Filey System written in Go. All the backend data is
Expand Down Expand Up @@ -464,11 +465,17 @@ 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()
// Do not try to get xattrs for the root inode
// Otherwise the path in the S3 request is empty, which is invalid
if inode.Id != 1 {
xattrs, err = inode.ListXattr()
}

ncopied := 0

Expand Down