diff --git a/backend/app/service/cronjob_helper.go b/backend/app/service/cronjob_helper.go index 44b43435a..d91416456 100644 --- a/backend/app/service/cronjob_helper.go +++ b/backend/app/service/cronjob_helper.go @@ -186,6 +186,8 @@ func (u *CronjobService) HandleRmExpired(backType, backupPath, localDir string, itemPath := strings.TrimPrefix(backupPath, "/") itemPath = strings.TrimSuffix(itemPath, "/") + "/" fileItem = itemPath + strings.TrimPrefix(file, localDir+"/") + } else { + fileItem = strings.TrimPrefix(file, localDir+"/") } } _, _ = backClient.Delete(fileItem) diff --git a/frontend/src/views/cronjob/record/index.vue b/frontend/src/views/cronjob/record/index.vue index fc473f14e..2c9732e2b 100644 --- a/frontend/src/views/cronjob/record/index.vue +++ b/frontend/src/views/cronjob/record/index.vue @@ -528,12 +528,17 @@ const search = async () => { if (!currentRecord.value) { currentRecord.value = records.value[0]; } else { + let beDelete = true; for (const item of records.value) { if (item.id === currentRecord.value.id) { + beDelete = false; currentRecord.value = item; break; } } + if (beDelete) { + currentRecord.value = records.value[0]; + } } if (currentRecord.value?.records) { loadRecord(currentRecord.value);