Skip to content

Commit

Permalink
Merge pull request #4774 from testwill/clsoe_file
Browse files Browse the repository at this point in the history
fix: close contentFile
  • Loading branch information
andydotxyz committed Apr 9, 2024
2 parents 8c17dda + b9e2351 commit 58d0413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/fyne/internal/commands/package-mobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (p *Packager) packageIOS(target string, tags []string) error {

iconDir := util.EnsureSubDir(assetDir, "AppIcon.appiconset")
contentFile, _ := os.Create(filepath.Join(iconDir, "Contents.json"))

defer contentFile.Close()
err = templates.XCAssetsDarwin.Execute(contentFile, nil)
if err != nil {
return fmt.Errorf("failed to write xcassets content template: %w", err)
Expand Down

0 comments on commit 58d0413

Please sign in to comment.