filer copy added uid/gid

This commit is contained in:
Chris Lu
2018-05-21 01:25:30 -07:00
parent f07482382b
commit 9dd228747c
10 changed files with 163 additions and 94 deletions

View File

@@ -59,11 +59,13 @@ func (fs *FilerServer) ListEntries(ctx context.Context, req *filer_pb.ListEntrie
return resp, nil
}
func (fs *FilerServer) GetFileAttributes(ctx context.Context, req *filer_pb.GetFileAttributesRequest) (*filer_pb.GetFileAttributesResponse, error) {
func (fs *FilerServer) GetEntryAttributes(ctx context.Context, req *filer_pb.GetEntryAttributesRequest) (*filer_pb.GetEntryAttributesResponse, error) {
attributes := &filer_pb.FuseAttributes{}
found, entry, err := fs.filer.FindEntry(filer2.NewFullPath(req.ParentDir, req.Name))
fullpath := filer2.NewFullPath(req.ParentDir, req.Name)
found, entry, err := fs.filer.FindEntry(fullpath)
if err != nil {
return nil, err
}
@@ -77,7 +79,9 @@ func (fs *FilerServer) GetFileAttributes(ctx context.Context, req *filer_pb.GetF
attributes.Mtime = entry.Mtime.Unix()
}
return &filer_pb.GetFileAttributesResponse{
glog.V(0).Infof("GetEntryAttributes %v: %+v", fullpath, attributes)
return &filer_pb.GetEntryAttributesResponse{
Attributes: attributes,
}, nil
}