Fix: get execute file path dynamically

This commit is contained in:
HFO4
2020-03-11 10:32:35 +08:00
parent b6e1e04ce0
commit 4d70f9fa3e
12 changed files with 27 additions and 16 deletions

View File

@@ -264,7 +264,7 @@ func (service *PathTestService) Test() serializer.Response {
policy := model.Policy{DirNameRule: service.Path}
path := policy.GeneratePath(1, "/My File")
path = filepath.Join(path, "test.txt")
file, err := util.CreatNestedFile(path)
file, err := util.CreatNestedFile(util.RelativePath(path))
if err != nil {
return serializer.ParamErr(fmt.Sprintf("无法创建路径 %s , %s", path, err.Error()), nil)
}