Skip to content

Truncate files when opening in metadata-collector#11505

Merged
bors merged 1 commit intorust-lang:masterfrom
Alexendoo:metadata-collector-truncate
Sep 14, 2023
Merged

Truncate files when opening in metadata-collector#11505
bors merged 1 commit intorust-lang:masterfrom
Alexendoo:metadata-collector-truncate

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
Contributor

bors commented Sep 14, 2023

📌 Commit 3c0fc15 has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 14, 2023

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

@bors
Copy link
Contributor

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
@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.

4 participants