Skip to content

Commit

Permalink
Fixing file tree scan
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Jul 16, 2023
1 parent 90e3bc5 commit cdcd539
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.0.2

- Fixed file tree scan

## 1.0.1

- Minor UI tweaks
Expand Down
41 changes: 20 additions & 21 deletions bin/docfd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/version_string.ml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
let s = "1.0.1"
let s = "1.0.2"

0 comments on commit cdcd539

Please sign in to comment.