Skip to content

fix: truncate file when not appending in writeFile, closes #7973 - #7982

Merged
amrbashir merged 3 commits into
tauri-apps:1.xfrom
zh217:1.x
Oct 9, 2023
Merged

fix: truncate file when not appending in writeFile, closes #7973#7982
amrbashir merged 3 commits into
tauri-apps:1.xfrom
zh217:1.x

Conversation

@zh217

@zh217 zh217 commented Oct 8, 2023

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

Original issue: #7973

@FabianLars

Copy link
Copy Markdown
Member

Hey, thanks for contributing! 2 things before we can merge this:

  1. I think this can be simplified by just using truncate()
  2. We require all commits to be signed, here's a guide on how to set it up: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

@zh217

zh217 commented Oct 9, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion. It's now changed and signed.

@FabianLars

Copy link
Copy Markdown
Member

Cool, thanks! One last thing i always forget myself is a changefile like this: https://github.com/tauri-apps/tauri/blob/dev/.changes/fix-ipc-payload.md - once that's added we can merge your PR :)

@FabianLars FabianLars left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@FabianLars FabianLars linked an issue Oct 9, 2023 that may be closed by this pull request
@amrbashir amrbashir changed the title Fix incomplete overwriting issue in writeFile, closes #7973 fix: truncate file when not appending in writeFile, closes #7973 Oct 9, 2023
@amrbashir
amrbashir merged commit 21cdbb4 into tauri-apps:1.x Oct 9, 2023
@zh217
zh217 deleted the 1.x branch October 9, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] writeTextFile does not completely overwrite existing file.

3 participants