Rollup merge of #133673 - onur-ozkan:windows-fixme, r=Kobzol
replace hard coded error id with `ErrorKind::DirectoryNotEmpty` Resolves an internal bootstrap FIXME.
This commit is contained in:
commit
bdb44d0227
1 changed files with 1 additions and 3 deletions
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue