new: Improve the automatic update module, add authentication, and fix some bugs

This commit is contained in:
2024-12-18 00:02:55 +08:00
parent 95f4496ab6
commit 05df3fa376
12 changed files with 109 additions and 22 deletions

View File

@@ -52,8 +52,7 @@ func CosLoadMarkdowns(config config.MConfig, localDir string) error {
marker := ""
prefix := config.Storage.COS.SavePath
encodingType := "url"
log.Println("start load markdown files")
isTruncated := true
for isTruncated {
opt := &cos.BucketGetOptions{
@@ -73,7 +72,7 @@ func CosLoadMarkdowns(config config.MConfig, localDir string) error {
if _, err := os.Stat(path.Dir(localFile)); err != nil && os.IsNotExist(err) {
_ = os.MkdirAll(path.Dir(localFile), os.ModePerm)
}
if strings.HasSuffix(localFile, "/") {
continue
}