Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 7a5d12f

Browse files
committed
'no extension' fix
1 parent f7ed8ec commit 7a5d12f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/filesystem.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ pub fn get_tree(root: &str) -> Vec<FileTree> {
3030
} else {
3131
let path = i.0;
3232
let mut content = fs::read_to_string(&path).expect("Failed to get file content.");
33-
let extension = path.extension().expect("Failed to get path extension!");
33+
let extension = match path.extension() {
34+
Some(ext) => ext,
35+
_ => continue
36+
};
3437

3538
if extension == "toml" {
3639
let parsed = content.parse::<Table>();

0 commit comments

Comments
 (0)