Compare commits

...

2 Commits

1 changed files with 2 additions and 2 deletions

View File

@ -95,8 +95,8 @@ func CreateConfigFile(req *proto.AddConfigFileReq, userId int) error {
err = fmt.Errorf("file path is invalid")
return err
}
_, err = os.Stat(file)
if err != nil {
_, fileErr := os.Stat(file)
if fileErr != nil {
//创建文件
f, err2 := os.Create(file)
if err2 != nil {