Skip to content

Commit 67896e1

Browse files
committed
delete_dir_contents: Use remove_dir_contents
This is used for * In temp.rs, the "root directory" (ie .rustump/tmp) * In check_updates, on tmp and toolchains We do not want to delete the containing directory, as discussed in #2430 There is still raw::remove_dir, which is used in a variety of places, notably utils::remove_dir, some of the calls to which need fixing. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
1 parent 2f4f81d commit 67896e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ where
637637
}
638638

639639
pub fn delete_dir_contents(dir_path: &Path) {
640-
match remove_dir_all::remove_dir_all(dir_path) {
640+
match remove_dir_all::remove_dir_contents(dir_path) {
641641
Err(e) if e.kind() != io::ErrorKind::NotFound => {
642642
panic!("Unable to clean up {}: {:?}", dir_path.display(), e);
643643
}

0 commit comments

Comments
 (0)