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> {
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() {