+2006-03-22 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ * branch lilypond_2_8
+
2006-03-22 Han-Wen Nienhuys <lilydev@localhost.localdomain>
* scripts/lilypond-book.py (samefile): new function, for windoze
inputs.append (name)
return inputs
+def samefile (f1, f2):
+ try:
+ return os.path.samefile (f1, f2)
+ except AttributeError: # Windoze
+ f1 = re.sub ("//*", "/", f1)
+ f2 = re.sub ("//*", "/", f2)
+ return f1 == f2
+
def do_file (input_filename):
# Ugh.
if not input_filename or input_filename == '-':
else:
if os.path.exists (input_filename) \
and os.path.exists (output_filename) \
- and os.path.samefile (output_filename, input_fullname):
+ and samefile (output_filename, input_fullname):
error (
_ ("Output would overwrite input file; use --output."))
exit (2)