Fix #913954 (cli conversion should support ./ as part of output filename)

This commit is contained in:
Kovid Goyal 2012-01-10 09:14:16 +05:30
parent 821c0db12b
commit a271f7af35

View File

@ -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)