X-Git-Url: https://git.xandkar.net/?p=dups.git;a=blobdiff_plain;f=dups.ml;h=e88d8885240378b84714202793ab850878588232;hp=46e8b917c3d4227564758411119632f3f40a421f;hb=61a05dbbfdda5f3539813fa196d960fb499c2f24;hpb=c66266c608c952190ad5fc8b82882cf15013ce26 diff --git a/dups.ml b/dups.ml index 46e8b91..e88d888 100644 --- a/dups.ml +++ b/dups.ml @@ -112,12 +112,14 @@ let main input = let () = let input = ref Paths_on_stdin in - Arg.parse [] (fun path -> - if Sys.file_exists path then - input := Root_path path - else begin - eprintf "File does not exist: %S\n%!" path; - exit 1 - end - ) ""; + Arg.parse + [] + (function + | path when Sys.file_exists path -> + input := Root_path path + | path -> + eprintf "File does not exist: %S\n%!" path; + exit 1 + ) + ""; main !input