diff --git a/server/service/sys_auto_code.go b/server/service/sys_auto_code.go index fcaa910c37e72f5b1d18072496aca3a2ee157e8b..b9a89b9c9acdebe404fa153631e28eaa64914185 100644 --- a/server/service/sys_auto_code.go +++ b/server/service/sys_auto_code.go @@ -80,7 +80,7 @@ func PreviewTemp(autoCode model.AutoCodeStruct) (map[string]string, error) { builder.Write(data) builder.WriteString("\n\n```") - pathArr := strings.Split(value.autoCodePath, "\\") + pathArr := strings.Split(value.autoCodePath, string(os.PathSeparator)) ret[pathArr[1]+"-"+pathArr[3]] = builder.String() _ = f.Close()