Skip to content

Commit 14a2cca

Browse files
rbtcollinsrami3l
authored andcommitted
Revert "refactor(utils)!: rename delete_dir_contents() to delete_dir_contents_or_unlink()"
This reverts commit bfd7baa.
1 parent f174e4a commit 14a2cca

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_or_unlink(&cfg.download_dir);
1010+
utils::delete_dir_contents(&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_or_unlink(&self.root_directory);
161+
utils::delete_dir_contents(&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_or_unlink(dir_path: &Path) {
613+
pub(crate) fn delete_dir_contents(dir_path: &Path) {
614614
let remove = if dir_path.is_symlink() {
615615
fs::remove_dir_all
616616
} else {

0 commit comments

Comments
 (0)