diff --git a/registry/storage/paths.go b/registry/storage/paths.go index 16e71583..4e9ad085 100644 --- a/registry/storage/paths.go +++ b/registry/storage/paths.go @@ -208,7 +208,7 @@ func pathFor(spec pathSpec) (string, error) { return path.Join(path.Join(append(blobLinkPathComponents, components...)...), "link"), nil case layersPathSpec: - return append(repoPrefix, v.repo, "_layers") + return path.Join(append(repoPrefix, v.name, "_layers")...), nil case blobsPathSpec: blobsPathPrefix := append(rootPrefix, "blobs") return path.Join(blobsPathPrefix...), nil @@ -340,7 +340,7 @@ func (manifestTagIndexEntryLinkPathSpec) pathSpec() {} // layersPathSpec contains the path for the layers inside a repo type layersPathSpec struct { - repo string + name string } func (layersPathSpec) pathSpec() {} diff --git a/registry/storage/registry.go b/registry/storage/registry.go index 4809f153..d74403f5 100644 --- a/registry/storage/registry.go +++ b/registry/storage/registry.go @@ -330,7 +330,7 @@ func (repo *repository) Blobs(ctx context.Context) distribution.BlobStore { // TODO(stevvooe): linkPath limits this blob store to only layers. // This instance cannot be used for manifest checks. linkPathFns: []linkPathFunc{blobLinkPath}, - linkDirectoryPathSpec: layersPathSpec, + linkDirectoryPathSpec: layersPathSpec{name: repo.name.Name()}, deleteEnabled: repo.registry.deleteEnabled, resumableDigestEnabled: repo.resumableDigestEnabled, }