diff --git a/backend/app/service/backup.go b/backend/app/service/backup.go index 5337b7980..c5a2073ff 100644 --- a/backend/app/service/backup.go +++ b/backend/app/service/backup.go @@ -111,9 +111,9 @@ func (u *BackupService) DownloadRecord(info dto.DownloadRecord) (string, error) return "", fmt.Errorf("new cloud storage client failed, err: %v", err) } targetPath := fmt.Sprintf("%s/download/%s/%s", constant.DataDir, info.FileDir, info.FileName) - if _, err := os.Stat(path.Base(targetPath)); err != nil && os.IsNotExist(err) { - if err = os.MkdirAll(path.Base(targetPath), os.ModePerm); err != nil { - global.LOG.Errorf("mkdir %s failed, err: %v", path.Base(targetPath), err) + if _, err := os.Stat(path.Dir(targetPath)); err != nil && os.IsNotExist(err) { + if err = os.MkdirAll(path.Dir(targetPath), os.ModePerm); err != nil { + global.LOG.Errorf("mkdir %s failed, err: %v", path.Dir(targetPath), err) } } srcPath := fmt.Sprintf("%s/%s", info.FileDir, info.FileName) diff --git a/backend/app/service/database_mysql.go b/backend/app/service/database_mysql.go index 5803733e0..42308497e 100644 --- a/backend/app/service/database_mysql.go +++ b/backend/app/service/database_mysql.go @@ -257,6 +257,9 @@ func (u *MysqlService) ChangeAccess(info dto.ChangeDBInfo) error { if err != nil { return err } + if info.Value == mysql.Permission { + return nil + } } app, err := appInstallRepo.LoadBaseInfo("mysql", "") if err != nil { diff --git a/frontend/src/components/upload/index.vue b/frontend/src/components/upload/index.vue index 205052370..dd118fd22 100644 --- a/frontend/src/components/upload/index.vue +++ b/frontend/src/components/upload/index.vue @@ -149,6 +149,7 @@ const search = async () => { const onRecover = async (row: File.File) => { let params = { + source: 'LOCAL', type: type.value, name: name.value, detailName: detailName.value, diff --git a/frontend/src/views/database/redis/setting/persistence/index.vue b/frontend/src/views/database/redis/setting/persistence/index.vue index e643782fc..eada5934a 100644 --- a/frontend/src/views/database/redis/setting/persistence/index.vue +++ b/frontend/src/views/database/redis/setting/persistence/index.vue @@ -201,6 +201,7 @@ const onBackup = async () => { }; const onRecover = async () => { let param = { + source: currentRow.value.source, type: 'redis', name: '', detailName: '',