This commit is contained in:
Brad Fitzpatrick 2014-12-23 17:55:01 -08:00
commit 1cbae79412
2 changed files with 4 additions and 2 deletions

View File

@ -432,7 +432,7 @@ func (n *mutDir) Remove(req *fuse.RemoveRequest, intr fs.Intr) fuse.Error {
claim := schema.NewDelAttributeClaim(n.permanode, "camliPath:"+req.Name, "") claim := schema.NewDelAttributeClaim(n.permanode, "camliPath:"+req.Name, "")
_, err := n.fs.client.UploadAndSignBlob(claim) _, err := n.fs.client.UploadAndSignBlob(claim)
if err != nil { if err != nil {
log.Println("mutDir.Create:", err) log.Println("mutDir.Remove:", err)
return fuse.EIO return fuse.EIO
} }
// Remove child from map. // Remove child from map.

View File

@ -84,8 +84,10 @@ func (x *xattr) set(req *fuse.SetxattrRequest) fuse.Error {
return fuse.EIO return fuse.EIO
} }
val := make([]byte, len(req.Xattr))
copy(val, req.Xattr)
x.mu.Lock() x.mu.Lock()
(*x.xattrs)[req.Name] = req.Xattr (*x.xattrs)[req.Name] = val
x.mu.Unlock() x.mu.Unlock()
return nil return nil