diff --git a/backend/app/service/file.go b/backend/app/service/file.go index 71db41c89..dd9d792dd 100644 --- a/backend/app/service/file.go +++ b/backend/app/service/file.go @@ -251,8 +251,11 @@ func (f *FileService) MvFile(m request.FileMove) error { if !fo.Stat(m.NewPath) { return buserr.New(constant.ErrPathNotFound) } - for _, path := range m.OldPaths { - if path == m.NewPath || strings.Contains(m.NewPath, filepath.Clean(path)+"/") { + for _, oldPath := range m.OldPaths { + if !fo.Stat(oldPath) { + return buserr.WithName(constant.ErrFileNotFound, oldPath) + } + if oldPath == m.NewPath || strings.Contains(m.NewPath, filepath.Clean(oldPath)+"/") { return buserr.New(constant.ErrMovePathFailed) } } diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 37a9c5df5..206e9f81c 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1091,6 +1091,8 @@ const message = { fileRecycleBin: 'File Recycle Bin', fileRecycleBinMsg: '{0} recycle bin', wordWrap: 'Automatically wrap', + deleteHelper2: + 'Are you sure you want to delete the selected file? The deletion operation cannot be rolled back', }, ssh: { autoStart: 'Auto Start', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 458e4626d..d9a96c9b0 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1040,6 +1040,7 @@ const message = { fileRecycleBin: '檔案回收站', fileRecycleBinMsg: '已{0}回收站', wordWrap: '自動換行', + deleteHelper2: '確定刪除所選檔案? 刪除操作不可回滾', }, ssh: { autoStart: '開機自啟', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index b235e9ac9..832177a66 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1041,6 +1041,7 @@ const message = { fileRecycleBin: '文件回收站', fileRecycleBinMsg: '已{0}回收站', wordWrap: '自动换行', + deleteHelper2: '确定删除所选文件?删除操作不可回滚', }, ssh: { autoStart: '开机自启', diff --git a/frontend/src/views/host/file-management/delete/index.vue b/frontend/src/views/host/file-management/delete/index.vue index 60318e5b1..6bdfce4f6 100644 --- a/frontend/src/views/host/file-management/delete/index.vue +++ b/frontend/src/views/host/file-management/delete/index.vue @@ -3,9 +3,15 @@
- +
- {{ $t('file.deleteHelper') }} + {{ $t('file.deleteHelper') }} + {{ $t('file.deleteHelper2') }}
diff --git a/frontend/src/views/website/runtime/php/param/index.vue b/frontend/src/views/website/runtime/php/param/index.vue index 1bbb52139..c4e7af18d 100644 --- a/frontend/src/views/website/runtime/php/param/index.vue +++ b/frontend/src/views/website/runtime/php/param/index.vue @@ -85,6 +85,7 @@ const handleParams = () => { rules[p.envKey] = [Rules.requiredInput]; } } + form[p.envKey] = p.default; } emit('update:rules', rules); updateParam();