From: Han-Wen Nienhuys Date: Wed, 20 Dec 2006 13:38:39 +0000 (+0100) Subject: robustness: don't inspect symlinks. Fix: strip path of symlink dest. X-Git-Tag: release/2.11.4-1~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=705bfe2f34d636af9ffcdeb8944e132e5e05ba3c;p=lilypond.git robustness: don't inspect symlinks. Fix: strip path of symlink dest. --- diff --git a/stepmake/bin/add-html-footer.py b/stepmake/bin/add-html-footer.py index 83c398ee9e..1fd33a8375 100644 --- a/stepmake/bin/add-html-footer.py +++ b/stepmake/bin/add-html-footer.py @@ -172,6 +172,9 @@ def remove_self_ref (s): return s def do_file (f): + if os.path.islink (f): + return + s = open (f).read() s = re.sub ('%', '%%', s) @@ -341,7 +344,7 @@ def i18n (file_name, page): page = page + languages if content_negotiation and language_menu: - os.symlink (file_name, os.path.splitext (file_name)[0] + '.en.html') + os.symlink (file_name, os.path.splitext (os.path.basename (file_name))[0] + '.en.html') return page