Skip to content

Commit 6b33768

Browse files
Rollup merge of #113002 - camelid:bootstrap-settings.bak, r=jyn514
bootstrap: Backup `settings.json` to the correct filename The old code actually replaced `.json` with `.bak` (so, `settings.bak`), rather than appending `.bak` as claimed (`settings.json.bak`). `Path::set_extension` can instead be used with dots: > The new extension may contain dots and will be used in its entirety, > but only the part after the final dot will be reflected in > `self.extension`. r? ``@jyn514``
2 parents 9e0f427 + ce32691 commit 6b33768

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/setup.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ fn create_vscode_settings_maybe(config: &Config) -> io::Result<()> {
582582
Some(false) => {
583583
// exists and is not current version or outdated, so back it up
584584
let mut backup = vscode_settings.clone();
585-
backup.set_extension("bak");
585+
backup.set_extension("json.bak");
586586
eprintln!("warning: copying `settings.json` to `settings.json.bak`");
587587
fs::copy(&vscode_settings, &backup)?;
588588
"Updated"

0 commit comments

Comments
 (0)