Skip to content

Commit bdb44d0

Browse files
authored
Rollup merge of #133673 - onur-ozkan:windows-fixme, r=Kobzol
replace hard coded error id with `ErrorKind::DirectoryNotEmpty` Resolves an internal bootstrap FIXME.
2 parents ec000a7 + fd90198 commit bdb44d0

File tree

1 file changed

+1
-3
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+1
-3
lines changed

src/bootstrap/src/core/build_steps/clean.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,8 @@ fn rm_rf(path: &Path) {
203203

204204
do_op(path, "remove dir", |p| match fs::remove_dir(p) {
205205
// Check for dir not empty on Windows
206-
// FIXME: Once `ErrorKind::DirectoryNotEmpty` is stabilized,
207-
// match on `e.kind()` instead.
208206
#[cfg(windows)]
209-
Err(e) if e.raw_os_error() == Some(145) => Ok(()),
207+
Err(e) if e.kind() == ErrorKind::DirectoryNotEmpty => Ok(()),
210208
r => r,
211209
});
212210
}

0 commit comments

Comments
 (0)