We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
reset_directory
1 parent f17047b commit a2ed508Copy full SHA for a2ed508
src/tools/opt-dist/src/utils/io.rs
@@ -7,7 +7,7 @@ use std::path::Path;
7
/// Delete and re-create the directory.
8
pub fn reset_directory(path: &Utf8Path) -> anyhow::Result<()> {
9
log::info!("Resetting directory {path}");
10
- let _ = std::fs::remove_dir(path);
+ let _ = std::fs::remove_dir_all(path);
11
std::fs::create_dir_all(path)?;
12
Ok(())
13
}
0 commit comments