Merge branch 'refs/heads/feat-file'
This commit is contained in:
commit
b06f970dd8
|
|
@ -95,8 +95,8 @@ func CreateConfigFile(req *proto.AddConfigFileReq, userId int) error {
|
||||||
err = fmt.Errorf("file path is invalid")
|
err = fmt.Errorf("file path is invalid")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
_, err = os.Stat(file)
|
_, fileErr := os.Stat(file)
|
||||||
if err != nil {
|
if fileErr != nil {
|
||||||
//创建文件
|
//创建文件
|
||||||
f, err2 := os.Create(file)
|
f, err2 := os.Create(file)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue