Browse Source

fix: 修复变量名拼错 (#5792)

* fix: 修复变量名拼错

* fix: 修复变量名拼错

* fix: 修复变量名拼错

* fix: 修复变量名拼错

* fix: 修复变量名拼错
pull/5817/head
maoball 4 months ago committed by GitHub
parent
commit
eb4d550305
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      backend/app/service/file.go
  2. 2
      backend/constant/errs.go
  3. 2
      backend/i18n/lang/en.yaml
  4. 2
      backend/i18n/lang/zh-Hant.yaml
  5. 2
      backend/i18n/lang/zh.yaml

4
backend/app/service/file.go

@ -183,7 +183,7 @@ func (f *FileService) Create(op request.FileCreate) error {
}
fo := files.NewFileOp()
if fo.Stat(op.Path) {
return buserr.New(constant.ErrFileIsExit)
return buserr.New(constant.ErrFileIsExist)
}
mode := op.Mode
if mode == 0 {
@ -273,7 +273,7 @@ func (f *FileService) ChangeOwner(req request.FileRoleUpdate) error {
func (f *FileService) Compress(c request.FileCompress) error {
fo := files.NewFileOp()
if !c.Replace && fo.Stat(filepath.Join(c.Dst, c.Name)) {
return buserr.New(constant.ErrFileIsExit)
return buserr.New(constant.ErrFileIsExist)
}
return fo.Compress(c.Files, c.Dst, c.Name, files.CompressType(c.Type), c.Secret)
}

2
backend/constant/errs.go

@ -95,7 +95,7 @@ var (
ErrPathNotFound = "ErrPathNotFound"
ErrMovePathFailed = "ErrMovePathFailed"
ErrLinkPathNotFound = "ErrLinkPathNotFound"
ErrFileIsExit = "ErrFileIsExit"
ErrFileIsExist = "ErrFileIsExist"
ErrFileUpload = "ErrFileUpload"
ErrFileDownloadDir = "ErrFileDownloadDir"
ErrCmdNotFound = "ErrCmdNotFound"

2
backend/i18n/lang/en.yaml

@ -74,7 +74,7 @@ ErrFileToLarge: "file is too large"
ErrPathNotFound: "Path is not found"
ErrMovePathFailed: "The target path cannot contain the original path!"
ErrLinkPathNotFound: "Target path does not exist!"
ErrFileIsExit: "File or directory already exists!"
ErrFileIsExist: "File or directory already exists!"
ErrFileUpload: "Failed to upload file {{.name}} {{.detail}}"
ErrFileDownloadDir: "Download folder not supported"
ErrCmdNotFound: "{{ .name}} command does not exist, please install this command on the host first"

2
backend/i18n/lang/zh-Hant.yaml

@ -75,7 +75,7 @@ ErrFileToLarge: "文件超過10M,無法打開"
ErrPathNotFound: "目錄不存在"
ErrMovePathFailed: "目標路徑不能包含原路徑!"
ErrLinkPathNotFound: "目標路徑不存在!"
ErrFileIsExit: "文件或文件夾已存在!"
ErrFileIsExist: "文件或文件夾已存在!"
ErrFileUpload: "{{ .name }} 上傳文件失敗 {{ .detail}}"
ErrFileDownloadDir: "不支持下載文件夾"
ErrCmdNotFound: "{{ .name}} 命令不存在,請先在宿主機安裝此命令"

2
backend/i18n/lang/zh.yaml

@ -74,7 +74,7 @@ ErrFileToLarge: "文件超过10M,无法打开"
ErrPathNotFound: "目录不存在"
ErrMovePathFailed: "目标路径不能包含原路径!"
ErrLinkPathNotFound: "目标路径不存在!"
ErrFileIsExit: "文件或文件夹已存在!"
ErrFileIsExist: "文件或文件夹已存在!"
ErrFileUpload: "{{ .name }} 上传文件失败 {{ .detail}}"
ErrFileDownloadDir: "不支持下载文件夹"
ErrCmdNotFound: "{{ .name}} 命令不存在,请先在宿主机安装此命令"

Loading…
Cancel
Save