Skip to content

Commit

Permalink
Merge pull request #10 from ErikKalkoken/fixes
Browse files Browse the repository at this point in the history
Fix: Exported file not closed
  • Loading branch information
ErikKalkoken authored Sep 28, 2024
2 parents 6d0a3ad + a24d922 commit 5dc64c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FyneApp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Website = "https://github.com/ErikKalkoken/janice"
Icon = "icon.png"
Name = "Janice"
ID = "io.github.erikkalkoken.janice"
Version = "0.3.0"
Version = "0.4.1"
Build = 1

[Release]
Expand Down
1 change: 1 addition & 0 deletions internal/jsondocument/jsondocument.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ func (j *JSONDocument) Value(uid widget.TreeNodeID) Node {

// Load loads JSON data from a reader and builds a new JSON document from it.
// It reports it's current progress to the caller via updates to progressInfo.
// Closes the reader.
func (j *JSONDocument) Load(ctx context.Context, reader fyne.URIReadCloser, progressInfo binding.Untyped) error {
j.progressInfo = progressInfo
data, err := j.load(ctx, reader)
Expand Down
1 change: 1 addition & 0 deletions internal/ui/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (u *UI) makeMenu() *fyne.MainMenu {
if f == nil {
return
}
defer f.Close()
_, err = f.Write(byt)
if err != nil {
u.showErrorDialog("Failed to write file", err)
Expand Down

0 comments on commit 5dc64c5

Please sign in to comment.