This is an automated email from the ASF dual-hosted git repository.
kumfo pushed a commit to branch fix/cdn
in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
The following commit(s) were added to refs/heads/fix/cdn by this push:
new 18b8125 fix(cdn): aliyun oss cdn add sync status check
18b8125 is described below
commit 18b812537856309d7b20eb481ca58c8d629f1314
Author: kumfo <[email protected]>
AuthorDate: Fri Jul 19 15:57:36 2024 +0800
fix(cdn): aliyun oss cdn add sync status check
---
cdn-aliyunoss/aliyunoss.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cdn-aliyunoss/aliyunoss.go b/cdn-aliyunoss/aliyunoss.go
index a145341..2d7c7a2 100644
--- a/cdn-aliyunoss/aliyunoss.go
+++ b/cdn-aliyunoss/aliyunoss.go
@@ -119,7 +119,9 @@ func (c *CDN) scanFiles() {
}
log.Info("complete: scan embed files")
enable = true
+ return
}
+
err := c.scanStaticPathFiles(staticPath)
if err != nil {
log.Info("fialed: scan static path files")
@@ -149,7 +151,7 @@ func (c *CDN) scanStaticPathFiles(fileName string) (err
error) {
continue
}
- var file fs.File
+ var file *os.File
filePath := filepath.Join(fileName, info.Name())
fi, _ := info.Info()
size := fi.Size()