Skip to content

Commit

Permalink
Add reminder to match the error kind once DirectoryNotEmpty is sta…
Browse files Browse the repository at this point in the history
…bilized
  • Loading branch information
ChrisDenton committed Dec 9, 2021
1 parent 913996b commit caed83d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bootstrap/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ fn rm_rf(path: &Path) {
do_op(path, "remove dir", |p| {
fs::remove_dir(p).or_else(|e| {
// Check for dir not empty on Windows
// FIXME: Once `ErrorKind::DirectoryNotEmpty` is stabilized,
// match on `e.kind()` instead.
#[cfg(windows)]
if e.raw_os_error() == Some(145) {
return Ok(());
Expand Down

0 comments on commit caed83d

Please sign in to comment.