avoid changing attributes for mount directory

This commit is contained in:
Chris Lu 2019-02-18 12:14:28 -08:00
parent ad257ae179
commit a1c7dc3806

View file

@ -379,6 +379,10 @@ func (dir *Dir) removeFolder(ctx context.Context, req *fuse.RemoveRequest) error
func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error { func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error {
if dir.attributes == nil {
return nil
}
glog.V(3).Infof("%v dir setattr %+v, fh=%d", dir.Path, req, req.Handle) glog.V(3).Infof("%v dir setattr %+v, fh=%d", dir.Path, req, req.Handle)
if req.Valid.Mode() { if req.Valid.Mode() {
dir.attributes.FileMode = uint32(req.Mode) dir.attributes.FileMode = uint32(req.Mode)