diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-16 13:11:39 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-16 13:11:45 +0200 |
| commit | 4fd89b808cabc8afb0d75b9700be1da96989c4b7 (patch) | |
| tree | 4083f1c1c58b827a85a10b0b412e291cfc650133 /src/file_finder.rs | |
| parent | 5643a0416ded5e5135a968cb57a279568b471248 (diff) | |
Add logic to read and assign files / layout
Diffstat (limited to 'src/file_finder.rs')
| -rw-r--r-- | src/file_finder.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/file_finder.rs b/src/file_finder.rs index 598f868..105a999 100644 --- a/src/file_finder.rs +++ b/src/file_finder.rs @@ -2,8 +2,8 @@ use crate::file_handler::{File, FileHandler}; use std::fs::read_dir; use std::path::PathBuf; -pub fn find_files(directory_path: PathBuf) -> Vec<File> { - return find_files_recursively(&directory_path, &directory_path); +pub fn find_files(directory_path: &PathBuf) -> Vec<File> { + return find_files_recursively(directory_path, directory_path); } fn find_files_recursively(root_path: &PathBuf, directory_path: &PathBuf) -> Vec<File> { @@ -13,7 +13,7 @@ fn find_files_recursively(root_path: &PathBuf, directory_path: &PathBuf) -> Vec< for entry in entries { let path = entry.unwrap().path(); let relative_path = path.strip_prefix(&root_path).unwrap(); - if relative_path.starts_with(".") && !relative_path.starts_with(".well-known") { + if relative_path.starts_with(".git") { continue; } if path.is_dir() { |