diff --git a/src/utils/routes/cours.rs b/src/utils/routes/cours.rs index d5b62f8..aa0301f 100644 --- a/src/utils/routes/cours.rs +++ b/src/utils/routes/cours.rs @@ -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(