Skip to content

Commit

Permalink
feat: 证书推送自动创建文件夹 (#5501)
Browse files Browse the repository at this point in the history
Refs #3523
  • Loading branch information
zhengkunwang223 authored Jun 19, 2024
1 parent 4460329 commit 0bdeba7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/app/service/website_ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs
DisableCNAME: create.DisableCNAME,
}
if create.PushDir {
if !files.NewFileOp().Stat(create.Dir) {
return res, buserr.New(constant.ErrLinkPathNotFound)
fileOP := files.NewFileOp()
if !fileOP.Stat(create.Dir) {
_ = fileOP.CreateDir(create.Dir, 0755)
}
websiteSSL.Dir = create.Dir
}
Expand Down

0 comments on commit 0bdeba7

Please sign in to comment.