2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 13:47:15 +08:00

refactor: 重构 tools.Mkdir 函数

This commit is contained in:
耗子
2023-11-12 03:09:41 +08:00
parent ac420debbb
commit 4c41ec036c
12 changed files with 59 additions and 31 deletions

View File

@@ -411,7 +411,9 @@ func (r *Postgresql16Controller) UploadBackup(ctx http.Context) http.Response {
backupPath := r.setting.Get(models.SettingKeyBackupPath) + "/postgresql"
if !tools.Exists(backupPath) {
tools.Mkdir(backupPath, 0644)
if err = tools.Mkdir(backupPath, 0644); err != nil {
return nil
}
}
name := file.GetClientOriginalName()