don't crash when no dir
This commit is contained in:
parent
2b811359f4
commit
cd1dafdc26
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,11 @@ pub fn get_filetree(
|
|||
exclusion_list: &[String],
|
||||
exclusion_patterns: &[Regex],
|
||||
) -> FileNode {
|
||||
gen_filetree(initial_dir, exclusion_list, exclusion_patterns).unwrap()
|
||||
gen_filetree(initial_dir, exclusion_list, exclusion_patterns).unwrap_or(FileNode {
|
||||
name: String::new(),
|
||||
is_dir: false,
|
||||
children: vec![],
|
||||
})
|
||||
}
|
||||
|
||||
fn gen_filetree(
|
||||
|
|
Loading…
Reference in a new issue