diff --git a/modules/storage/obs.go b/modules/storage/obs.go index c98e570c5..2868e3ec2 100755 --- a/modules/storage/obs.go +++ b/modules/storage/obs.go @@ -345,6 +345,7 @@ func GetAllObjectByBucketAndPrefix(bucket string, prefix string) ([]FileInfo, er if val.Key == prefix { continue } + if strings.HasSuffix(val.Key, "/") { isDir = true } else { @@ -357,6 +358,7 @@ func GetAllObjectByBucketAndPrefix(bucket string, prefix string) ([]FileInfo, er IsDir: isDir, ParenDir: "", } + log.Info("file name=" + val.Key) fileInfos = append(fileInfos, fileInfo) } if output.IsTruncated {