From 82179d500d95c66f6dc764b26cf870573529da57 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 9 Nov 2021 17:08:59 +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 | 2 ++ 1 file changed, 2 insertions(+) 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 {