Skip to content

Commit

Permalink
Fix public stat and listcontainer response to contain the correct pre…
Browse files Browse the repository at this point in the history
…fix (#902)

Fixes COPY operations on public links
  • Loading branch information
Vincent Petry authored Jun 30, 2020
1 parent 6e1b7ad commit 39a90d4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func (s *service) Stat(ctx context.Context, req *provider.StatRequest) (*provide

// prevent leaking internal paths
if statResponse.Info != nil {
statResponse.Info.Path = path.Join("/", tkn, relativePath)
statResponse.Info.Path = path.Join(s.mountPath, "/", tkn, relativePath)
}

return statResponse, nil
Expand Down Expand Up @@ -428,7 +428,7 @@ func (s *service) ListContainer(ctx context.Context, req *provider.ListContainer
}

for i := range listContainerR.Infos {
listContainerR.Infos[i].Path = path.Join("/", tkn, relativePath, path.Base(listContainerR.Infos[i].Path))
listContainerR.Infos[i].Path = path.Join(s.mountPath, "/", tkn, relativePath, path.Base(listContainerR.Infos[i].Path))
}

return listContainerR, nil
Expand Down

0 comments on commit 39a90d4

Please sign in to comment.