diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-09-25 09:18:06 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-09-25 09:18:06 -0700 |
| commit | 60c1ada4c170297f1470ad78df3b1f0520769632 (patch) | |
| tree | 2ab1788834039d6b4610adb0e3bf9aed4504c694 /weed/filesys/dir.go | |
| parent | 578f8a6dec0e8c396221ae165ad3db18096ea957 (diff) | |
| download | seaweedfs-60c1ada4c170297f1470ad78df3b1f0520769632.tar.xz seaweedfs-60c1ada4c170297f1470ad78df3b1f0520769632.zip | |
remove filer grpc API GetEntryAttributes
Diffstat (limited to 'weed/filesys/dir.go')
| -rw-r--r-- | weed/filesys/dir.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index c0771159a..95afbf265 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -54,19 +54,21 @@ func (dir *Dir) Attr(context context.Context, attr *fuse.Attr) error { err := dir.wfs.withFilerClient(func(client filer_pb.SeaweedFilerClient) error { - request := &filer_pb.GetEntryAttributesRequest{ + request := &filer_pb.LookupDirectoryEntryRequest{ + Directory: parent, Name: name, - ParentDir: parent, } glog.V(1).Infof("read dir %s attr: %v", dir.Path, request) - resp, err := client.GetEntryAttributes(context, request) + resp, err := client.LookupDirectoryEntry(context, request) if err != nil { glog.V(0).Infof("read dir %s attr %v: %v", dir.Path, request, err) return err } - dir.attributes = resp.Attributes + if resp.Entry!=nil { + dir.attributes = resp.Entry.Attributes + } return nil }) |
