Skip to content

Commit

Permalink
Merge pull request #934 from Vafilor/fix/s3.files
Browse files Browse the repository at this point in the history
fix: s3 not listing files in file browser
  • Loading branch information
Vafilor authored Jul 20, 2021
2 parents abd8d3c + 64d6dde commit 023fb50
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/workflow_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -1745,13 +1745,16 @@ func (c *Client) ListFiles(namespace, key string) (files []*File, err error) {

files = make([]*File, 0)

if key == "/" {
key = ""
} else if len(key) > 0 {
if len(key) > 0 && strings.HasPrefix(key, "/") {
key = key[1:]
}

if len(key) > 0 {
if string(key[len(key)-1]) != "/" {
key += "/"
}
}

switch {
case config.ArtifactRepository.S3 != nil:
{
Expand Down

0 comments on commit 023fb50

Please sign in to comment.