Skip to content

Commit 993750d

Browse files
mark-i-mXAMPPRocky
authored andcommitted
Address XAMPPRocky's comments
1 parent 558ba04 commit 993750d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.gitattributes

-2
This file was deleted.

blacksmith/src/lib.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::{
44
collections::BTreeMap,
55
fmt::Write,
66
io::{BufRead, BufReader},
7+
path::Path,
78
};
89

910
use mdbook::{
@@ -136,9 +137,9 @@ impl Blacksmith {
136137
("toolstate.html", "/infra/toolstate.html"),
137138
("triage-procedure.html", "/release/triage-procedure.html"),
138139
("x-py.html", "https://rust-lang.github.io/rustc-guide/building/how-to-build-and-run.html"),
139-
("bug-fix-procedure.html", "https://rust-lang.github.io/rustc-guide/bug-fix-procedure.html"),
140-
("diagnostic-codes.html", "https://rust-lang.github.io/rustc-guide/diagnostics/diagnostic-codes.html"),
141-
("profile-queries.html", "https://rust-lang.github.io/rustc-guide/queries/profiling.html"),
140+
("compiler/bug-fix-procedure.html", "https://rust-lang.github.io/rustc-guide/bug-fix-procedure.html"),
141+
("compiler/diagnostic-codes.html", "https://rust-lang.github.io/rustc-guide/diagnostics/diagnostic-codes.html"),
142+
("compiler/profile-queries.html", "https://rust-lang.github.io/rustc-guide/queries/profiling.html"),
142143
];
143144

144145
// Inititalise book directory if not built yet.
@@ -151,6 +152,10 @@ impl Blacksmith {
151152

152153
log::trace!("Redirecting {} to {}.", filename, url);
153154

155+
if let Some(parent) = Path::new(filename).parent() {
156+
std::fs::create_dir_all(parent).unwrap();
157+
}
158+
154159
std::fs::write(dir.join(filename), template).unwrap();
155160
}
156161
}

0 commit comments

Comments
 (0)