Skip to content

Commit

Permalink
fix: 删除带特殊符号文件的报错问题 (1Panel-dev#3657) (1Panel-dev#3658)
Browse files Browse the repository at this point in the history
  • Loading branch information
igophper authored Jan 20, 2024
1 parent 600cfba commit 8df29b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/utils/files/file_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func (f FileOp) Cut(oldPaths []string, dst, name string, cover bool) 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 {
return err
}
Expand Down

0 comments on commit 8df29b2

Please sign in to comment.