Skip to content

Commit 68db1c4

Browse files
committed
refactor(utils)!: rename delete_dir_contents() to delete_dir_contents_following_links()
1 parent cb27b9b commit 68db1c4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/cli/rustup_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ fn update(cfg: &mut Cfg, m: &ArgMatches) -> Result<utils::ExitCode> {
10071007
} else {
10081008
common::update_all_channels(cfg, self_update, m.get_flag("force"))?;
10091009
info!("cleaning up downloads & tmp directories");
1010-
utils::delete_dir_contents(&cfg.download_dir);
1010+
utils::delete_dir_contents_following_links(&cfg.download_dir);
10111011
cfg.temp_cfg.clean();
10121012
}
10131013

src/dist/temp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl Cfg {
158158
}
159159

160160
pub(crate) fn clean(&self) {
161-
utils::delete_dir_contents(&self.root_directory);
161+
utils::delete_dir_contents_following_links(&self.root_directory);
162162
}
163163
}
164164

src/utils/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ where
610610
})
611611
}
612612

613-
pub(crate) fn delete_dir_contents(dir_path: &Path) {
613+
pub(crate) fn delete_dir_contents_following_links(dir_path: &Path) {
614614
use remove_dir_all::RemoveDir;
615615

616616
match raw::open_dir_following_links(dir_path).and_then(|mut p| p.remove_dir_contents(None)) {

0 commit comments

Comments
 (0)