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

Truncate files if they exist prior to extraction from archive #1245

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

bkabrda
Copy link
Contributor

@bkabrda bkabrda commented Aug 28, 2024

Summary

When we're uncompressing a file, when the target file already exists, right now it's not truncated. This means that when we're writing less content than what the file already has, the rest of the old content would remain in the file. This PR fixes that by truncating the file when we open it.

Signed-off-by: Slavek Kabrda <bkabrda@redhat.com>
@bobcallaway bobcallaway merged commit dedd490 into sigstore:main Aug 29, 2024
22 checks passed
bouskaJ pushed a commit to securesign/scaffolding that referenced this pull request Aug 30, 2024
bouskaJ added a commit to securesign/scaffolding that referenced this pull request Aug 30, 2024
Truncate files if they exist prior to extraction from archive (sigstore#1245)
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.

2 participants