diff --git a/CHANGELOG.md b/CHANGELOG.md index b7ddbe1..d24683a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.2 + +- Fixed file tree scan + ## 1.0.1 - Minor UI tweaks diff --git a/bin/docfd.ml b/bin/docfd.ml index 0311321..1ccba1e 100644 --- a/bin/docfd.ml +++ b/bin/docfd.ml @@ -52,31 +52,30 @@ let list_files_recursively (dir : string) : string list = let rec aux depth path = if depth >= !Params.max_file_tree_depth then () else ( - if Sys.is_directory path then ( - let next_choices = - try - Sys.readdir path - with - | _ -> [||] - in - Array.iter (fun f -> - aux (depth + 1) (Filename.concat path f) + match Sys.is_directory path with + | is_dir -> ( + if is_dir then ( + let next_choices = + try + Sys.readdir path + with + | _ -> [||] + in + Array.iter (fun f -> + aux (depth + 1) (Filename.concat path f) + ) + next_choices + ) else ( + let ext = Filename.extension path in + if List.mem ext !Params.recognized_exts then ( + add path + ) ) - next_choices - ) else ( - let ext = Filename.extension path in - if List.mem ext !Params.recognized_exts then ( - add path ) - ) + | exception _ -> () ) in - ( - try - aux 0 dir - with - | _ -> () - ); + aux 0 dir; !l let run diff --git a/bin/version_string.ml b/bin/version_string.ml index b2c3101..6865840 100644 --- a/bin/version_string.ml +++ b/bin/version_string.ml @@ -1 +1 @@ -let s = "1.0.1" +let s = "1.0.2"