This is an automated email from the ASF dual-hosted git repository. kumfo pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
commit ce1678c74b7575fd43564de941610f3cafe2f6c7 Author: kumfo <[email protected]> AuthorDate: Fri Jul 19 15:48:01 2024 +0800 fix(cdn): aliyun oss cdn add sync status check --- cdn-aliyunoss/aliyunoss.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cdn-aliyunoss/aliyunoss.go b/cdn-aliyunoss/aliyunoss.go index 150d11c..9001674 100644 --- a/cdn-aliyunoss/aliyunoss.go +++ b/cdn-aliyunoss/aliyunoss.go @@ -35,7 +35,10 @@ import ( "strings" ) -var staticPath = os.Getenv("ANSWER_STATIC_PATH") +var ( + staticPath = os.Getenv("ANSWER_STATIC_PATH") + enable = false +) //go:embed info.yaml var Info embed.FS @@ -45,8 +48,6 @@ const ( defaultMaxFileSize int64 = 10 * 1024 * 1024 ) -var enable = false - type CDN struct { Config *CDNConfig } @@ -216,6 +217,9 @@ func (c *CDN) scanEmbedFiles(fileName string) (err error) { for _, info := range entry { if info.IsDir() { err = c.scanEmbedFiles(filepath.Join(fileName, info.Name())) + if err != nil { + return + } continue }
