From d755c96050156ab50604838bbb47cfb51dc90bea Mon Sep 17 00:00:00 2001 From: John Whitington Date: Tue, 28 Feb 2023 16:55:35 +0000 Subject: [PATCH] more --- cpdfcommand.ml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 1dffeb1..5625a51 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -3396,9 +3396,17 @@ let check_bookmarks_mistake () = if args.merge_add_bookmarks_use_titles && not args.merge_add_bookmarks then Printf.eprintf "Warning: -merge-add-bookmarks-use-titles is for use with -merge-add-bookmarks\n" +let check_clashing_output_name () = + match args.out with + | File s -> + if (List.exists (function (InFile s', _, _, _, _, _) when s = s' -> true | _ -> false) args.inputs) then + Printf.eprintf "Warning: output file name clashes with input file name. Malformed file may result.\n" + | _ -> () + (* Main function *) let go () = check_bookmarks_mistake (); + check_clashing_output_name (); match args.op with | Some Version -> flprint