From a271f7af35a3b07a009a972fad1aa3145e2940bc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 10 Jan 2012 09:14:16 +0530 Subject: [PATCH] Fix #913954 (cli conversion should support ./ as part of output filename) --- src/calibre/ebooks/conversion/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/conversion/cli.py b/src/calibre/ebooks/conversion/cli.py index 1c7a29d7ff..559402ca1c 100644 --- a/src/calibre/ebooks/conversion/cli.py +++ b/src/calibre/ebooks/conversion/cli.py @@ -68,8 +68,8 @@ def check_command_line_options(parser, args, log): raise SystemExit(1) output = args[2] - if output.startswith('.') and (output != '.' and not - output.startswith('..')): + if (output.startswith('.') and output[:2] not in {'..', '.'} and '/' not in + output and '\\' not in output): output = os.path.splitext(os.path.basename(input))[0]+output output = os.path.abspath(output)