mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 02:26:42 -07:00
Fix building from scratch
This commit is contained in:
parent
e91bbc38c5
commit
311a6b40d5
2 changed files with 3 additions and 4 deletions
|
@ -4,10 +4,6 @@ use std::path::Path;
|
|||
|
||||
/// Simple helper to remove the contents of a directory without removing the directory itself.
|
||||
pub fn remove_dir_contents(path: &Path) -> anyhow::Result<()> {
|
||||
if !path.exists() {
|
||||
std::fs::create_dir_all(path)?;
|
||||
return Ok(());
|
||||
}
|
||||
for entry in path.read_dir()? {
|
||||
let entry = entry?;
|
||||
let path = entry.path();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue