Fix reset_directory function
Before it was not deleting non-empty directories.
This commit is contained in:
parent
f17047bc90
commit
a2ed508f54
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ use std::path::Path;
|
|||
/// Delete and re-create the directory.
|
||||
pub fn reset_directory(path: &Utf8Path) -> anyhow::Result<()> {
|
||||
log::info!("Resetting directory {path}");
|
||||
let _ = std::fs::remove_dir(path);
|
||||
let _ = std::fs::remove_dir_all(path);
|
||||
std::fs::create_dir_all(path)?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue