]> git.r.bdr.sh - rbdr/page/blobdiff - src/file_finder.rs
Relicense
[rbdr/page] / src / file_finder.rs
index 598f8684155be33b02288045c51b4874ca674bc6..bcd368dbf94089280c36010ac35f51c6b4618aca 100644 (file)
@@ -2,8 +2,8 @@ use crate::file_handler::{File, FileHandler};
 use std::fs::read_dir;
 use std::path::PathBuf;
 
 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> {
 }
 
 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();
     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") || relative_path.starts_with(".gitignore") {
             continue;
         }
         if path.is_dir() {
             continue;
         }
         if path.is_dir() {