Skip to content

Commit

Permalink
pkg/chartmuseum/server: fix chart object path invalid(missing repo pr…
Browse files Browse the repository at this point in the history
…efix) in multi-tenant server and fix #421.

Signed-off-by: scnace <[email protected]>
  • Loading branch information
scbizu committed Feb 23, 2021
1 parent 2258ecf commit 6990830
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/chartmuseum/server/multitenant/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,12 @@ func (server *MultiTenantServer) fetchChartsInStorage(log cm_logger.LoggingFn, r
for _, object := range allObjects {
if object.HasExtension(cm_repo.ChartPackageFileExtension) {
// Since ListObject cannot fetch the content from file list
object, err = server.StorageBackend.GetObject(object.Path)
objectDetail, err := server.StorageBackend.GetObject(pathutil.Join(repo, object.Path))
if err != nil {
return nil, fmt.Errorf("backend storage: chart not found: %q", err)
}
// do not change other object field except content
object.Content = objectDetail.Content
filteredObjects = append(filteredObjects, object)
}
}
Expand Down

0 comments on commit 6990830

Please sign in to comment.