1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

fix: 删除带特殊符号文件的报错问题 (#3657) (#3658)

Refs #3657
This commit is contained in:
igophper 2024-01-20 22:17:37 +08:00 committed by GitHub
parent 6bc4cfc8ac
commit e8c94450f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,7 +319,7 @@ func (f FileOp) Cut(oldPaths []string, dst, name string, cover bool) error {
} }
func (f FileOp) Mv(oldPath, dstPath string) error { func (f FileOp) Mv(oldPath, dstPath string) error {
cmdStr := fmt.Sprintf("mv %s %s", oldPath, dstPath) cmdStr := fmt.Sprintf(`mv "%s" "%s"`, oldPath, dstPath)
if err := cmd.ExecCmd(cmdStr); err != nil { if err := cmd.ExecCmd(cmdStr); err != nil {
return err return err
} }