mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-07 06:30:53 +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)
|
||||
|
||||
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:
|
||||
{
|
||||
|
Reference in New Issue
Block a user