diff --git a/pkg/fs/mut.go b/pkg/fs/mut.go index 5d3518d33..5eafa51d3 100644 --- a/pkg/fs/mut.go +++ b/pkg/fs/mut.go @@ -432,7 +432,7 @@ func (n *mutDir) Remove(req *fuse.RemoveRequest, intr fs.Intr) fuse.Error { claim := schema.NewDelAttributeClaim(n.permanode, "camliPath:"+req.Name, "") _, err := n.fs.client.UploadAndSignBlob(claim) if err != nil { - log.Println("mutDir.Create:", err) + log.Println("mutDir.Remove:", err) return fuse.EIO } // Remove child from map. diff --git a/pkg/fs/xattr.go b/pkg/fs/xattr.go index d2602dd75..b8c29f1a8 100644 --- a/pkg/fs/xattr.go +++ b/pkg/fs/xattr.go @@ -84,8 +84,10 @@ func (x *xattr) set(req *fuse.SetxattrRequest) fuse.Error { return fuse.EIO } + val := make([]byte, len(req.Xattr)) + copy(val, req.Xattr) x.mu.Lock() - (*x.xattrs)[req.Name] = req.Xattr + (*x.xattrs)[req.Name] = val x.mu.Unlock() return nil