Skip to content

Commit

Permalink
Rewrite remove_dir_all to be correct
Browse files Browse the repository at this point in the history
The fact that this had to be rewritten does not bode well
  • Loading branch information
retep998 committed Feb 2, 2018
1 parent b1b9edf commit dcf53c1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/libstd/sys/windows/fs.rs
Expand Up @@ -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())?;
}
Expand Down

0 comments on commit dcf53c1

Please sign in to comment.