From c0f2581f55b18cfbfc9dae980cdfe2e8f3927aed Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 8 Jun 2023 13:55:45 +0530 Subject: [PATCH] Only show warning when file that is filtered exists --- src/calibre/ebooks/conversion/plugins/html_input.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/conversion/plugins/html_input.py b/src/calibre/ebooks/conversion/plugins/html_input.py index ed2f385a77..c1d85b2d37 100644 --- a/src/calibre/ebooks/conversion/plugins/html_input.py +++ b/src/calibre/ebooks/conversion/plugins/html_input.py @@ -269,7 +269,8 @@ class HTMLInput(InputFormatPlugin): q = os.path.normcase(get_long_path_name(link)) if not q.startswith(self.root_dir_of_input): if not self.opts.allow_local_files_outside_root: - self.log.warn('Not adding {} as it is outside the document root: {}'.format(q, self.root_dir_of_input)) + if os.path.exists(q): + self.log.warn('Not adding {} as it is outside the document root: {}'.format(q, self.root_dir_of_input)) return None, None return link, frag