From 7b476f3e92f78a2d8a14ebea9bd4ddb730d5abf5 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Wed, 22 Nov 2023 16:46:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=9B=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/internal/logic/resourcebackuplogic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/resource/internal/logic/resourcebackuplogic.go b/server/resource/internal/logic/resourcebackuplogic.go index b0b63fff..d12ffc09 100644 --- a/server/resource/internal/logic/resourcebackuplogic.go +++ b/server/resource/internal/logic/resourcebackuplogic.go @@ -149,7 +149,7 @@ func (l *ResourceBackupLogic) ResourceBackup(req *types.ResourceBackupReq, useri func regexStr(unquotedStr string, urls *map[string]string) error { // 创建一个正则表达式 - regex := regexp.MustCompile(`"https:\\/\\/s3\.(.*?)"`) + regex := regexp.MustCompile(`"https:\\/\\/s3|https://s3\.(.*?)"`) // 查找符合正则表达式的字符串 matches := regex.FindAllString(unquotedStr, -1) var urlsData = *urls @@ -162,7 +162,7 @@ func regexStr(unquotedStr string, urls *map[string]string) error { urlsData[s3url_to_s3id.GetS3ResourceIdFormUrl(matchStr)] = matchStr } - regex02 := regexp.MustCompile(`"https:\\/\\/fusenstorage\.s3\.(.*?)"`) + regex02 := regexp.MustCompile(`"https:\\/\\/fusenstorage\.s3|https://fusenstorage.s3\.(.*?)"`) // 查找符合正则表达式的字符串 matches02 := regex02.FindAllString(unquotedStr, -1) // 打印匹配到的字符串