Skip to content

Commit 023fb50

Browse files
authored
Merge pull request #934 from Vafilor/fix/s3.files
fix: s3 not listing files in file browser
2 parents abd8d3c + 64d6dde commit 023fb50

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/workflow_execution.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,13 +1745,16 @@ func (c *Client) ListFiles(namespace, key string) (files []*File, err error) {
17451745

17461746
files = make([]*File, 0)
17471747

1748-
if key == "/" {
1749-
key = ""
1750-
} else if len(key) > 0 {
1748+
if len(key) > 0 && strings.HasPrefix(key, "/") {
1749+
key = key[1:]
1750+
}
1751+
1752+
if len(key) > 0 {
17511753
if string(key[len(key)-1]) != "/" {
17521754
key += "/"
17531755
}
17541756
}
1757+
17551758
switch {
17561759
case config.ArtifactRepository.S3 != nil:
17571760
{

0 commit comments

Comments
 (0)