diff options
| author | Tim Neumann <mail@timnn.me> | 2016-07-13 15:15:28 +0200 |
|---|---|---|
| committer | Tim Neumann <mail@timnn.me> | 2016-07-13 15:15:28 +0200 |
| commit | a2718217dca7bfcbb563337d53c3c1adea3321cc (patch) | |
| tree | 25ef903f6bb94ed4cb2cd801dbe845b3bb9dcd5a /src/bootstrap | |
| parent | c346482a77eb301d8ca21ac02f5d063852120ab3 (diff) | |
| download | rust-a2718217dca7bfcbb563337d53c3c1adea3321cc.tar.gz rust-a2718217dca7bfcbb563337d53c3c1adea3321cc.zip | |
only remove directory if it exists
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/doc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index 247b9603c0b..c2636384dbb 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -181,7 +181,7 @@ pub fn rustc(build: &Build, stage: u32, target: &str, out: &Path) { let out_dir = build.stage_out(&compiler, Mode::Librustc) .join(target).join("doc"); let rustdoc = build.rustdoc(&compiler); - if !up_to_date(&rustdoc, &out_dir.join("rustc/index.html")) { + if !up_to_date(&rustdoc, &out_dir.join("rustc/index.html")) && out_dir.exists() { t!(fs::remove_dir_all(&out_dir)); } let mut cargo = build.cargo(&compiler, Mode::Librustc, target, "doc"); |
