From d41d868a8d015c0c3c658fcf6b9739d95f69914d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E7=A8=B3?= <56105412+anwen-anyi@users.noreply.github.com> Date: Tue, 9 May 2023 20:44:57 +0800 Subject: [PATCH] fix(baidu_photo): change folder name length limit (close #4351 in #4353) Co-authored-by: Andy Hsu --- drivers/baidu_photo/help.go | 2 +- drivers/baidu_photo/utils.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/baidu_photo/help.go b/drivers/baidu_photo/help.go index 524f6a89..bf234534 100644 --- a/drivers/baidu_photo/help.go +++ b/drivers/baidu_photo/help.go @@ -18,7 +18,7 @@ func getTid() string { // 检查名称 func checkName(name string) bool { - return len(name) <= 20 && regexp.MustCompile("[\u4e00-\u9fa5A-Za-z0-9_-]").MatchString(name) + return len(name) <= 50 && regexp.MustCompile("[\u4e00-\u9fa5A-Za-z0-9_-]").MatchString(name) } func toTime(t int64) *time.Time { diff --git a/drivers/baidu_photo/utils.go b/drivers/baidu_photo/utils.go index 5a7dd801..15761036 100644 --- a/drivers/baidu_photo/utils.go +++ b/drivers/baidu_photo/utils.go @@ -23,7 +23,7 @@ const ( ) var ( - ErrNotSupportName = errors.New("only chinese and english, numbers and underscores are supported, and the length is no more than 20") + ErrNotSupportName = errors.New("only chinese and english, numbers and underscores are supported, and the length is no more than 50") ) func (d *BaiduPhoto) Request(furl string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) {