1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 22:18:07 +08:00

feat: 证书推送自动创建文件夹 (#5501)

Refs https://github.com/1Panel-dev/1Panel/issues/3523
This commit is contained in:
zhengkunwang 2024-06-19 16:48:58 +08:00 committed by GitHub
parent 4460329d2d
commit 0bdeba7288
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,8 +129,9 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs
DisableCNAME: create.DisableCNAME, DisableCNAME: create.DisableCNAME,
} }
if create.PushDir { if create.PushDir {
if !files.NewFileOp().Stat(create.Dir) { fileOP := files.NewFileOp()
return res, buserr.New(constant.ErrLinkPathNotFound) if !fileOP.Stat(create.Dir) {
_ = fileOP.CreateDir(create.Dir, 0755)
} }
websiteSSL.Dir = create.Dir websiteSSL.Dir = create.Dir
} }