Use os.Create so that the file will be fully written on every startup

nostruct
Stein Ivar Berghei 2022-12-01 08:55:52 +01:00
parent b770f341d0
commit 2f3c14c3cb
1 changed files with 1 additions and 1 deletions

2
mpd.go
View File

@ -24,7 +24,7 @@ type MPD struct {
func init() {
log.Println("mpd.go loading..")
f, err := os.OpenFile(config.GetString("mpd.config"), os.O_RDWR|os.O_CREATE, 0755)
f, err := os.Create(config.GetString("mpd.config"))
if err != nil {
log.Fatal(err)
}