Skip to content

Commit 2ac71c1

Browse files
authored
Merge branch 'main' into allow-anon-artifactory-store-access
2 parents 9c966e4 + bd66664 commit 2ac71c1

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

pkg/store/artifactory_store.go

+3-9
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,9 @@ func (s *ArtifactoryStore) getKey(stack string, component string, key string) (s
115115
return "", fmt.Errorf("stack delimiter is not set")
116116
}
117117

118-
stackParts := strings.Split(stack, *s.stackDelimiter)
119-
componentParts := strings.Split(component, "/")
120-
121-
parts := []string{s.repoName, s.prefix}
122-
parts = append(parts, stackParts...)
123-
parts = append(parts, componentParts...)
124-
parts = append(parts, key)
125-
126-
return strings.ReplaceAll(strings.Join(parts, "/"), "//", "/"), nil
118+
prefixParts := []string{s.repoName, s.prefix}
119+
prefix := strings.Join(prefixParts, "/")
120+
return getKey(prefix, *s.stackDelimiter, stack, component, key, "/")
127121
}
128122

129123
func (s *ArtifactoryStore) Get(stack string, component string, key string) (interface{}, error) {

0 commit comments

Comments
 (0)