add require read file by name

This commit is contained in:
Asim Aslam
2021-05-23 18:12:59 +01:00
parent 2bcbf256fe
commit 49db4bc81b
3 changed files with 45 additions and 32 deletions

View File

@@ -56,7 +56,7 @@ func (e *File) Read(ctx context.Context, req *file.ReadRequest, rsp *file.ReadRe
// filter the file
for _, file := range files {
if file.Path == req.Path {
if file.Path == req.Path && file.Name == req.Name {
// strip the tenant id
file.Id = strings.TrimPrefix(file.Id, tenantId+"/")
file.Project = strings.TrimPrefix(file.Project, tenantId+"/")