]> git.donarmstrong.com Git - lilypond.git/commit
Lilypond-book: Fix problem with os.path.abspath in Windows
authorReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 6 Sep 2010 19:25:16 +0000 (21:25 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 6 Sep 2010 19:25:16 +0000 (21:25 +0200)
commit08fa04b8e1abcc1cfdb92a40c69583f0405658ba
treed4ca8d94d6a528c9501d7767839b491a556a6c0a
parentbe0996f37b76766c5d1d780ad29d965ad3ae4d9d
Lilypond-book: Fix problem with os.path.abspath in Windows

The check whether input file == output file needs to use the absolute
path to the input file, since the CWD has changed meanwhile (and is
the output dir at that point). Unfortunately, we can't call os.path.abspath
right at the beginning and use the abspath for all of the processing,
because os.path.abspath will replace forward slashes by backslashes
in Windows (the path is normalized!). That path with backslashes
are then printed to the snippet map files and cause l-p to fail with
wrongly escaped characters...

As a solution, use the relative pathname of the input file for all
processing, but also store the abspath for that one particular
infile==outfile check.
scripts/lilypond-book.py