Skip to content

Commit

Permalink
We must close files that are opened to write
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Sep 9, 2021
1 parent 2314327 commit 09fd03c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/fyne_demo/tutorials/dialog.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ func fileSaved(f fyne.URIWriteCloser, w fyne.Window) {
if err != nil {
dialog.ShowError(err, w)
}
err = f.Close()
if err != nil {
dialog.ShowError(err, w)
}
log.Println("Saved to...", f.URI())
}

Expand Down
1 change: 0 additions & 1 deletion storage/uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,5 +530,4 @@ func CreateListable(u fyne.URI) error {
}

return lrepo.CreateListable(u)

}

0 comments on commit 09fd03c

Please sign in to comment.