def do_file (input_filename, included=False):
# Ugh.
+ input_absname = input_filename
if not input_filename or input_filename == '-':
in_handle = sys.stdin
input_fullname = '<stdin>'
# Otherwise, "lilypond-book -o out test.tex" will complain that it is
# overwriting the input file (which it is actually not), since the
# input filename is relative to the CWD...
- input_fullname = os.path.abspath (input_fullname)
+ input_absname = os.path.abspath (input_fullname)
note_input_file (input_fullname)
in_handle = file (input_fullname)
input_base + global_options.formatter.default_extension)
if (os.path.exists (input_filename)
and os.path.exists (output_filename)
- and samefile (output_filename, input_fullname)):
+ and samefile (output_filename, input_absname)):
error (
_ ("Output would overwrite input file; use --output."))
exit (2)