Skip to content

Commit a490590

Browse files
rbtcollinsrami3l
authored andcommitted
Revert "fix(utils): unlink input path in delete_dir_contents() if it's a link"
This reverts commit 6792d46.
1 parent 14a2cca commit a490590

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/utils/utils.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -611,12 +611,7 @@ where
611611
}
612612

613613
pub(crate) fn delete_dir_contents(dir_path: &Path) {
614-
let remove = if dir_path.is_symlink() {
615-
fs::remove_dir_all
616-
} else {
617-
remove_dir_all::remove_dir_contents
618-
};
619-
match remove(dir_path) {
614+
match remove_dir_all::remove_dir_contents(dir_path) {
620615
Err(e) if e.kind() != io::ErrorKind::NotFound => {
621616
panic!("Unable to clean up {}: {:?}", dir_path.display(), e);
622617
}

0 commit comments

Comments
 (0)