mirror of
https://github.com/felixangell/phi.git
synced 2024-09-11 15:55:25 +03:00
fix file creation from pr
This commit is contained in:
parent
5dc4710546
commit
88c0a3caac
@ -82,7 +82,8 @@ func (b *Buffer) OpenFile(filePath string) {
|
||||
|
||||
// if the file doesn't exist, try to create it before reading it
|
||||
if _, err := os.Stat(filePath); os.IsNotExist(err) {
|
||||
if f, err = os.Create(filePath); err != nil {
|
||||
f, err := os.Create(filePath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
} else {
|
||||
f.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user