Add reminder to match the error kind once DirectoryNotEmpty is stabilized
This commit is contained in:
parent
913996b8ee
commit
caed83d400
1 changed files with 2 additions and 0 deletions
|
|
@ -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(());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue