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

Overwrite option preserves file past new length #11

Closed
juliand665 opened this issue Dec 5, 2022 · 2 comments
Closed

Overwrite option preserves file past new length #11

juliand665 opened this issue Dec 5, 2022 · 2 comments

Comments

@juliand665
Copy link

juliand665 commented Dec 5, 2022

I ran into this problem today because I start with the previous day's input in my template and simply overwrite it when the new day comes out, and day 4's input is much longer than day 5's. It turns out that the overwrite option simply writes the new bytes over the existing ones, without clearing any existing extra bytes. So overwriting a 1000-byte input file with a 500-byte input results in the 500 new bytes of input, followed by bytes 501-1000 of the previous contents.

@juliand665 juliand665 changed the title Overwrite option preserves file past new line count Overwrite option preserves file past new length Dec 5, 2022
@scarvalhojr
Copy link
Owner

Thanks for reporting, I'll take a look

@juliand665
Copy link
Author

Thanks for taking care of it so quickly! Really appreciate this tool :)

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

No branches or pull requests

2 participants