From 3804942ae4be45317aefbe700463f82c32ecdfec Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:08:03 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E4=BC=98=E5=8C=96=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=A4=87=E4=BB=BD=E8=B4=A6=E5=8F=B7=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=80=BB=E8=BE=91=20(#3758)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/cloud_storage/client/local.go | 5 ++++- frontend/src/views/cronjob/operate/index.vue | 18 +++++++++++------- frontend/src/views/setting/snapshot/index.vue | 13 ++++++++++--- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/backend/utils/cloud_storage/client/local.go b/backend/utils/cloud_storage/client/local.go index 7028f54c0..40e8a49be 100644 --- a/backend/utils/cloud_storage/client/local.go +++ b/backend/utils/cloud_storage/client/local.go @@ -81,8 +81,11 @@ func (c localClient) Download(src, target string) (bool, error) { } func (c localClient) ListObjects(prefix string) ([]string, error) { - itemPath := path.Join(c.dir, prefix) var files []string + itemPath := path.Join(c.dir, prefix) + if _, err := os.Stat(itemPath); err != nil { + return files, nil + } if err := filepath.Walk(itemPath, func(path string, info os.FileInfo, err error) error { if !info.IsDir() { files = append(files, info.Name()) diff --git a/frontend/src/views/cronjob/operate/index.vue b/frontend/src/views/cronjob/operate/index.vue index 8646d7274..6c2a60a33 100644 --- a/frontend/src/views/cronjob/operate/index.vue +++ b/frontend/src/views/cronjob/operate/index.vue @@ -253,7 +253,7 @@ multiple class="selectClass" v-model="dialogData.rowData!.backupAccountList" - @change="changeAccount(true)" + @change="changeAccount" >