From 8fc43e4c98fcd759450669a737b866151319ccab Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 30 Nov 2021 15:02:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- modules/storage/obs.go | 3 +++ 1 file changed, 3 insertions(+) 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)