From 2f3c14c3cbe0171a0b1991f22d1aa95687fb17a3 Mon Sep 17 00:00:00 2001 From: Stein Ivar Berghei Date: Thu, 1 Dec 2022 08:55:52 +0100 Subject: [PATCH] Use os.Create so that the file will be fully written on every startup --- mpd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpd.go b/mpd.go index 2a71bc6..b32ff0a 100644 --- a/mpd.go +++ b/mpd.go @@ -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) }