Rewrite remove_dir_all to be correct
The fact that this had to be rewritten does not bode well
This commit is contained in:
parent
b1b9edf5ae
commit
dcf53c1590
1 changed files with 5 additions and 3 deletions
|
|
@ -611,9 +611,11 @@ fn remove_dir_all_recursive(path: &Path) -> io::Result<()> {
|
|||
let child = child?;
|
||||
let child_type = child.file_type()?;
|
||||
if child_type.is_dir() {
|
||||
remove_dir_all_recursive(&child.path())?;
|
||||
} else if child_type.is_symlink_dir() {
|
||||
rmdir(&child.path())?;
|
||||
if child_type.is_reparse_point() {
|
||||
rmdir(&child.path())?;
|
||||
} else {
|
||||
remove_dir_all_recursive(&child.path())?;
|
||||
}
|
||||
} else {
|
||||
unlink(&child.path())?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue