fix(gioui/tracker): song files were not truncated when opened for writing (closes #103)

This commit is contained in:
5684185+vsariola@users.noreply.github.com 2023-09-02 14:32:23 +03:00
parent de3f4d987f
commit 231e055faf

View File

@ -32,7 +32,7 @@ func (t *Tracker) OpenSongFile(forced bool) {
func (t *Tracker) SaveSongFile() bool {
if p := t.FilePath(); p != "" {
if f, err := os.OpenFile(p, os.O_WRONLY|os.O_CREATE, 0644); err == nil {
if f, err := os.Create(p); err == nil {
return t.saveSong(f)
}
}