Add reminder to match the error kind once DirectoryNotEmpty
is stabilized
This commit is contained in:
parent
913996b8ee
commit
caed83d400
@ -75,6 +75,8 @@ fn rm_rf(path: &Path) {
|
|||||||
do_op(path, "remove dir", |p| {
|
do_op(path, "remove dir", |p| {
|
||||||
fs::remove_dir(p).or_else(|e| {
|
fs::remove_dir(p).or_else(|e| {
|
||||||
// Check for dir not empty on Windows
|
// Check for dir not empty on Windows
|
||||||
|
// FIXME: Once `ErrorKind::DirectoryNotEmpty` is stabilized,
|
||||||
|
// match on `e.kind()` instead.
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
if e.raw_os_error() == Some(145) {
|
if e.raw_os_error() == Some(145) {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
Loading…
Reference in New Issue
Block a user