diff --git a/modules/storage/obs.go b/modules/storage/obs.go index 400c77b86..8c6ccfa06 100755 --- a/modules/storage/obs.go +++ b/modules/storage/obs.go @@ -282,6 +282,9 @@ func GetOneLevelAllObjectUnderDir(bucket string, prefixRootPath string, relative input := &obs.ListObjectsInput{} input.Bucket = bucket input.Prefix = prefixRootPath + relativePath + if !strings.HasSuffix(input.Prefix, "/") { + input.Prefix += "/" + } output, err := ObsCli.ListObjects(input) fileInfos := make([]FileInfo, 0) prefixLen := len(input.Prefix)