Skip to content

Commit

Permalink
Added check of whether files exist
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Apr 17, 2023
1 parent 5f4153c commit 7409ca3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.6.1

- Added check of whether provided files exist

## 0.6.0

- Upgraded status bar and help text/key binding info
Expand Down
7 changes: 7 additions & 0 deletions src/docfd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ let run
Params.debug := debug;
Params.max_file_tree_depth := max_depth;
Params.max_word_search_range := max_word_search_range;
List.iter (fun file ->
if not (Sys.file_exists file) then (
Fmt.pr "Error: file \"%s\" does not exist\n" file;
exit 1
)
)
files;
Printf.printf "Scanning for text files\n";
let ui_mode, document_src =
if not (stdin_is_atty ()) then
Expand Down
2 changes: 1 addition & 1 deletion src/version_string.ml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
let s = "0.6.0"
let s = "0.6.1"

0 comments on commit 7409ca3

Please sign in to comment.