This commit is contained in:
Daniel 2024-10-26 22:41:58 +08:00
parent e25e8042ba
commit b32257cf1c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
16 changed files with 648 additions and 622 deletions

View file

@ -54,7 +54,7 @@ require (
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/sashabaranov/go-openai v1.29.1
github.com/shirou/gopsutil/v3 v3.24.5
github.com/siyuan-note/dejavu v0.0.0-20241016112457-5fc03573be87
github.com/siyuan-note/dejavu v0.0.0-20241026143313-2e180bfe2017
github.com/siyuan-note/encryption v0.0.0-20231219001248-1e028a4d13b4
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97
github.com/siyuan-note/filelock v0.0.0-20240724034355-d1ed7bf21d04

View file

@ -332,8 +332,8 @@ github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+D
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8=
github.com/siyuan-note/dejavu v0.0.0-20241016112457-5fc03573be87 h1:EG8h35jYH8/iOukQlhB2OE7S35PwOBBn+XMOK1rtgtg=
github.com/siyuan-note/dejavu v0.0.0-20241016112457-5fc03573be87/go.mod h1:7E+jOWm75Me1ss7Sc5UM6O5xMiATAyCbN3g7MP6Cgxw=
github.com/siyuan-note/dejavu v0.0.0-20241026143313-2e180bfe2017 h1:QOq6KYVbNKKx0qv8JJX6nuacQoYNtLkj9L4nWNEJ0mM=
github.com/siyuan-note/dejavu v0.0.0-20241026143313-2e180bfe2017/go.mod h1:7E+jOWm75Me1ss7Sc5UM6O5xMiATAyCbN3g7MP6Cgxw=
github.com/siyuan-note/encryption v0.0.0-20231219001248-1e028a4d13b4 h1:kJaw5L/evyW6LcB9IQT8PR4ppx8JVqOFP9Ix3rfwSrc=
github.com/siyuan-note/encryption v0.0.0-20231219001248-1e028a4d13b4/go.mod h1:UYcCCY+0wh+GmUoDOaO63j1sV5lgy7laLAk1XhEiUis=
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 h1:lM5v8BfNtbOL5jYwhCdMYBcYtr06IYBKjjSLAPMKTM8=

View file

@ -339,7 +339,7 @@ func InitConf() {
Conf.Sync.Mode = 1
}
if nil == Conf.Sync.S3 {
Conf.Sync.S3 = &conf.S3{SkipTlsVerify: true}
Conf.Sync.S3 = &conf.S3{PathStyle: true, SkipTlsVerify: true}
}
Conf.Sync.S3.Endpoint = util.NormalizeEndpoint(Conf.Sync.S3.Endpoint)
Conf.Sync.S3.Timeout = util.NormalizeTimeout(Conf.Sync.S3.Timeout)

View file

@ -584,6 +584,10 @@ func formatRepoErrorMsg(err error) string {
msg = Conf.Language(213)
} else if errors.Is(err, cloud.ErrCloudServiceUnavailable) {
msg = Conf.language(219)
} else if errors.Is(err, cloud.ErrCloudForbidden) {
msg = Conf.language(249)
} else if errors.Is(err, cloud.ErrCloudTooManyRequests) {
msg = Conf.language(250)
} else {
logging.LogErrorf("sync failed caused by network: %s", msg)
msgLowerCase := strings.ToLower(msg)