]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 22 Mar 2006 00:34:14 +0000 (00:34 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 22 Mar 2006 00:34:14 +0000 (00:34 +0000)
ChangeLog
scripts/lilypond-book.py

index 9e72da49723d3ec7bc16822032f6bfb0deae37cb..77c4bd8fb67cea25faed1bf6d99f99cf56cefa12 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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
index 5acc2238bc167a83d4a7e623442d742defb049fd..ea1f768a02289424536005e0b853670b4ba82641 100644 (file)
@@ -1554,6 +1554,14 @@ def note_input_file (name, inputs=[]):
        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 == '-':
@@ -1590,7 +1598,7 @@ def do_file (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)