Fix #779322 (ebook-convert can't output to "../filename.epub")

This commit is contained in:
Kovid Goyal 2011-05-08 09:12:55 -06:00
parent 2760116d3d
commit c49c187cb6

View File

@ -68,7 +68,8 @@ def check_command_line_options(parser, args, log):
raise SystemExit(1)
output = args[2]
if output.startswith('.') and output != '.':
if output.startswith('.') and (output != '.' and not
output.startswith('..')):
output = os.path.splitext(os.path.basename(input))[0]+output
output = os.path.abspath(output)