|
|
@@ -151,14 +151,15 @@ func (c *EngineClient) GenerateToPath(xmlfile string,dest_path string) {
|
|
|
os.MkdirAll(filepath.Dir(path), os.ModePerm)
|
|
|
ioutil.WriteFile(path, result.Data[i].Content, os.ModePerm)
|
|
|
} else if ft =="sql"{
|
|
|
- os.MkdirAll(filepath.Dir(path), os.ModePerm)
|
|
|
if strings.Index(path, "_gen.xml") > 0 {
|
|
|
+ os.MkdirAll(filepath.Dir(path), os.ModePerm)
|
|
|
ioutil.WriteFile(path, result.Data[i].Content, os.ModePerm)
|
|
|
} else {
|
|
|
_, err := os.Stat(path)
|
|
|
if err == nil {
|
|
|
//ioutil.WriteFile(path+"_new", result.Data[i].Content, os.ModePerm)
|
|
|
} else if os.IsNotExist(err) {
|
|
|
+ os.MkdirAll(filepath.Dir(path), os.ModePerm)
|
|
|
ioutil.WriteFile(path, result.Data[i].Content, os.ModePerm)
|
|
|
}
|
|
|
}
|