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")
|
||||
return err
|
||||
}
|
||||
_, err = os.Stat(file)
|
||||
if err != nil {
|
||||
_, fileErr := os.Stat(file)
|
||||
if fileErr != nil {
|
||||
//创建文件
|
||||
f, err2 := os.Create(file)
|
||||
if err2 != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue