修复创建目录组装错误问题

This commit is contained in:
白茶清欢 2022-05-21 20:01:58 +08:00
parent 22318b83cc
commit c890e06f01

2
dir.go
View File

@ -46,7 +46,7 @@ func (d *dir) RecursiveCreate() *dir {
// Date : 17:42 2022/5/21 // Date : 17:42 2022/5/21
func (d *dir) Create(dirPath string) *define.Result { func (d *dir) Create(dirPath string) *define.Result {
if !strings.HasPrefix(dirPath, "/") { if !strings.HasPrefix(dirPath, "/") {
dirPath = strings.ReplaceAll(d.workDir, "//", "/") dirPath = strings.ReplaceAll(d.workDir+"/"+dirPath, "//", "/")
} }
paramList := make([]string, 0) paramList := make([]string, 0)
if d.recursiveCreate { if d.recursiveCreate {