diff --git a/src/calibre/ebooks/conversion/cli.py b/src/calibre/ebooks/conversion/cli.py index 53eb9582b1..058ed49130 100644 --- a/src/calibre/ebooks/conversion/cli.py +++ b/src/calibre/ebooks/conversion/cli.py @@ -57,7 +57,8 @@ def check_command_line_options(parser, args, log): raise SystemExit(1) input = os.path.abspath(args[1]) - if not input.endswith('.recipe') and not os.access(input, os.R_OK): + if not input.endswith('.recipe') and not os.access(input, os.R_OK) and not \ + ('-h' in args or '--help' in args): log.error('Cannot read from', input) raise SystemExit(1) diff --git a/src/calibre/utils/poppler/__init__.py b/src/calibre/utils/poppler/__init__.py index c35216e081..5c44a99d8b 100644 --- a/src/calibre/utils/poppler/__init__.py +++ b/src/calibre/utils/poppler/__init__.py @@ -26,7 +26,7 @@ def get_metadata(stream, cover=True): if not title or not title.strip(): title = _('Unknown') if hasattr(stream, 'name'): - title = os.path.splitext(stream.name)[0] + title = os.path.splitext(os.path.basename(stream.name))[0] author = doc.author authors = string_to_authors(author) if author else [_('Unknown')] creator = doc.creator