Skip to content

fix(editor): check temp close#1339

Merged
FromSi merged 5 commits into
floatpane:masterfrom
MD-Mushfiqur123:fix/unchecked-tmpfile-close
May 24, 2026
Merged

fix(editor): check temp close#1339
FromSi merged 5 commits into
floatpane:masterfrom
MD-Mushfiqur123:fix/unchecked-tmpfile-close

Conversation

@MD-Mushfiqur123
Copy link
Copy Markdown
Contributor

@MD-Mushfiqur123 MD-Mushfiqur123 commented May 22, 2026

What?

Checks tmpFile.Close() when preparing the temporary file for the external editor.

If closing the temp file fails, the temp file is removed and an EditorFinishedMsg with a contextual error is returned.

Why?

Closes #728.

Ignoring tmpFile.Close() could hide failures that happen while flushing the written email body before opening the external editor. Returning the close error makes editor startup failures explicit and prevents continuing with an unreliable temp file.

@MD-Mushfiqur123 MD-Mushfiqur123 requested a review from a team as a code owner May 22, 2026 06:10
Copy link
Copy Markdown
Member

@floatpanebot floatpanebot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MD-Mushfiqur123! Please fix the following issues with your PR:

  • Title: Is too long (51 characters). The PR title must be strictly under 40 characters.
  • Body: Missing the ## What? or ## Why? headings required by the PR template.

@floatpanebot floatpanebot added bug Something isn't working size/XS Diff: 0–10 lines labels May 22, 2026
Comment thread main.go Outdated
@FromSi FromSi changed the title fix: check tmpFile.Close() error in external editor fix(editor): check temp close May 24, 2026
Copy link
Copy Markdown
Member

@floatpanebot floatpanebot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @FromSi! Please fix the following issues with your PR:

  • Body: Missing the ## What? or ## Why? headings required by the PR template.

@floatpanebot floatpanebot dismissed stale reviews from themself May 24, 2026 15:58

Formatting issues have been resolved. Thank you!

@floatpanebot floatpanebot added the size/S Diff: 11–50 lines label May 24, 2026
FromSi
FromSi previously approved these changes May 24, 2026
@FromSi FromSi merged commit 6c7f04b into floatpane:master May 24, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size/S Diff: 11–50 lines size/XS Diff: 0–10 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Unchecked tmpFile.Close() error in external editor

3 participants