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 when opening in metadata-collector #11505

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

Alexendoo
Copy link
Member

Fixes the issue seen here #11483 (comment) and in a couple other PRs

The changelog file was opened without truncating it, so if the new version is shorter than the old one stray contents would remain at the end of the file

The other two files first removed the file so didn't have this problem, but in all cases we now use fs::write/File::create which is write + create + truncate

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Sep 14, 2023

r? @Manishearth

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 14, 2023
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 14, 2023

📌 Commit 3c0fc15 has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 14, 2023

⌛ Testing commit 3c0fc15 with merge 6734e96...

@bors
Copy link
Collaborator

bors commented Sep 14, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 6734e96 to master...

@bors bors merged commit 6734e96 into rust-lang:master Sep 14, 2023
5 checks passed
@Alexendoo Alexendoo deleted the metadata-collector-truncate branch September 15, 2023 00:39
@Alexendoo Alexendoo mentioned this pull request Oct 5, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants