Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Oct 9, 2023
Merged

Conversation

zh217
Copy link
Contributor

@zh217 zh217 commented Oct 8, 2023

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
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
Copy link
Contributor Author

zh217 commented Oct 9, 2023

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

@FabianLars
Copy link
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 :)

Copy link
Member

@FabianLars FabianLars left a comment

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
18 checks passed
@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
Status: 🔎 In audit
Development

Successfully merging this pull request may close these issues.

[bug] writeTextFile does not completely overwrite existing file.
3 participants