Skip to content

Commit a2ed508

Browse files
committed
Fix reset_directory function
Before it was not deleting non-empty directories.
1 parent f17047b commit a2ed508

File tree

1 file changed

+1
-1
lines changed
  • src/tools/opt-dist/src/utils

1 file changed

+1
-1
lines changed

src/tools/opt-dist/src/utils/io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::path::Path;
77
/// Delete and re-create the directory.
88
pub fn reset_directory(path: &Utf8Path) -> anyhow::Result<()> {
99
log::info!("Resetting directory {path}");
10-
let _ = std::fs::remove_dir(path);
10+
let _ = std::fs::remove_dir_all(path);
1111
std::fs::create_dir_all(path)?;
1212
Ok(())
1313
}

0 commit comments

Comments
 (0)