diff --git a/CHANGELOG.md b/CHANGELOG.md index 5497e2edca..eaaaa5a981 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ More detailed release notes can be found on the [releases page](https://github.c * Empty main menu causes panic (#1073) * Installing using `fyne install` on Linux now works on distrubutions that don't use `/usr/local` * Fix recommendations from staticcheck +* Unable to overwrite file when using dialog.ShowFileSave (#1168) ## 1.3 - 5 June 2020 diff --git a/internal/driver/glfw/file.go b/internal/driver/glfw/file.go index 9c558b98e0..7009f7439b 100644 --- a/internal/driver/glfw/file.go +++ b/internal/driver/glfw/file.go @@ -36,10 +36,7 @@ func openFile(uri fyne.URI, create bool) (*file, error) { } path := uri.String()[7:] - f, err := os.Open(path) - if err != nil && create { - f, err = os.Create(path) - } + f, err := os.Create(path) // If it exists this will truncate which is what we wanted return &file{File: f, path: path}, err }