1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-02-07 17:10:07 +08:00

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

* fix: 修复变量名拼错

* fix: 修复变量名拼错

* fix: 修复变量名拼错

* fix: 修复变量名拼错

* fix: 修复变量名拼错
This commit is contained in:
maoball 2024-07-13 21:58:02 +08:00 committed by GitHub
parent 9a635e99b2
commit eb4d550305
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

@ -74,7 +74,7 @@ ErrFileToLarge: "file is too large"
ErrPathNotFound: "Path is not found" ErrPathNotFound: "Path is not found"
ErrMovePathFailed: "The target path cannot contain the original path!" ErrMovePathFailed: "The target path cannot contain the original path!"
ErrLinkPathNotFound: "Target path does not exist!" 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}}" ErrFileUpload: "Failed to upload file {{.name}} {{.detail}}"
ErrFileDownloadDir: "Download folder not supported" ErrFileDownloadDir: "Download folder not supported"
ErrCmdNotFound: "{{ .name}} command does not exist, please install this command on the host first" ErrCmdNotFound: "{{ .name}} command does not exist, please install this command on the host first"

View File

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

View File

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