Skip to content

Commit

Permalink
Rollup merge of rust-lang#133673 - onur-ozkan:windows-fixme, r=Kobzol
Browse files Browse the repository at this point in the history
replace hard coded error id with `ErrorKind::DirectoryNotEmpty`

Resolves an internal bootstrap FIXME.
  • Loading branch information
RalfJung authored Nov 30, 2024
2 parents ec000a7 + fd90198 commit bdb44d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/bootstrap/src/core/build_steps/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,8 @@ fn rm_rf(path: &Path) {

do_op(path, "remove dir", |p| match fs::remove_dir(p) {
// Check for dir not empty on Windows
// FIXME: Once `ErrorKind::DirectoryNotEmpty` is stabilized,
// match on `e.kind()` instead.
#[cfg(windows)]
Err(e) if e.raw_os_error() == Some(145) => Ok(()),
Err(e) if e.kind() == ErrorKind::DirectoryNotEmpty => Ok(()),
r => r,
});
}
Expand Down

0 comments on commit bdb44d0

Please sign in to comment.