mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-20 12:15:16 +08:00
fix: issue where s3 storage would not list files (but would list folders)
This commit is contained in:
@@ -1745,13 +1745,16 @@ func (c *Client) ListFiles(namespace, key string) (files []*File, err error) {
|
|||||||
|
|
||||||
files = make([]*File, 0)
|
files = make([]*File, 0)
|
||||||
|
|
||||||
if key == "/" {
|
if len(key) > 0 && strings.HasPrefix(key, "/") {
|
||||||
key = ""
|
key = key[1:]
|
||||||
} else if len(key) > 0 {
|
}
|
||||||
|
|
||||||
|
if len(key) > 0 {
|
||||||
if string(key[len(key)-1]) != "/" {
|
if string(key[len(key)-1]) != "/" {
|
||||||
key += "/"
|
key += "/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case config.ArtifactRepository.S3 != nil:
|
case config.ArtifactRepository.S3 != nil:
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user