Skip to content

Commit

Permalink
Revert "fix(utils): unlink input path in delete_dir_contents() if i…
Browse files Browse the repository at this point in the history
…t's a link"

This reverts commit 6792d46.
  • Loading branch information
rbtcollins authored and rami3l committed Apr 2, 2024
1 parent 14a2cca commit a490590
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/utils/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,7 @@ where
}

pub(crate) fn delete_dir_contents(dir_path: &Path) {
let remove = if dir_path.is_symlink() {
fs::remove_dir_all
} else {
remove_dir_all::remove_dir_contents
};
match remove(dir_path) {
match remove_dir_all::remove_dir_contents(dir_path) {
Err(e) if e.kind() != io::ErrorKind::NotFound => {
panic!("Unable to clean up {}: {:?}", dir_path.display(), e);
}
Expand Down

0 comments on commit a490590

Please sign in to comment.