mirror of
https://github.com/yv1ing/MollyBlog.git
synced 2025-09-16 14:53:45 +08:00
new: Improve the automatic update module, add authentication, and fix some bugs
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user