mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
🎨 S3/WebDAV 数据同步支持设置超时时间 Fix https://github.com/siyuan-note/siyuan/issues/6781
This commit is contained in:
parent
4629e15f57
commit
faa2d2d655
9 changed files with 72 additions and 7 deletions
|
|
@ -161,6 +161,19 @@ func GetChildDocDepth(treeAbsPath string) (ret int) {
|
|||
return
|
||||
}
|
||||
|
||||
func NormalizeTimeout(timeout int) int {
|
||||
if 7 > timeout {
|
||||
if 1 > timeout {
|
||||
return 30
|
||||
}
|
||||
return 7
|
||||
}
|
||||
if 300 < timeout {
|
||||
return 300
|
||||
}
|
||||
return timeout
|
||||
}
|
||||
|
||||
func NormalizeEndpoint(endpoint string) string {
|
||||
endpoint = strings.TrimSpace(endpoint)
|
||||
if "" == endpoint {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue