We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b1bd3a3 + e5efea4 commit ca225dfCopy full SHA for ca225df
src/rustbook/build.rs
@@ -183,6 +183,12 @@ impl Subcommand for Build {
183
tgt = PathBuf::from(&env::args().nth(3).unwrap());
184
}
185
186
+ // `_book` directory may already exist from previous runs. Check and
187
+ // delete it if it exists.
188
+ for entry in try!(fs::read_dir(&cwd)) {
189
+ let path = try!(entry).path();
190
+ if path == tgt { try!(fs::remove_dir_all(&tgt)) }
191
+ }
192
try!(fs::create_dir(&tgt));
193
194
try!(File::create(&tgt.join("rust-book.css")).and_then(|mut f| {
0 commit comments