From: Julien Rioux Date: Thu, 19 Jan 2012 14:52:13 +0000 (-0500) Subject: Build: Check if link exists, not if linked file exists. X-Git-Tag: release/2.15.27-1~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=817cb71f9189abb8c3743562f9c94439075d1f3b;p=lilypond.git Build: Check if link exists, not if linked file exists. --- diff --git a/python/auxiliar/postprocess_html.py b/python/auxiliar/postprocess_html.py index ba6d43e09f..42ccdbe541 100644 --- a/python/auxiliar/postprocess_html.py +++ b/python/auxiliar/postprocess_html.py @@ -381,5 +381,5 @@ def process_html_files (package_name = '', out_f.write (page_flavors[k][1]) out_f.close() # if the page is translated, a .en.html symlink is necessary for content negotiation - if target == 'online' and ext_list != ['']: + if target == 'online' and ext_list != [''] and not os.path.lexists (name_filter (prefix + '.en.html')): os.symlink (os.path.basename (prefix) + '.html', name_filter (prefix + '.en.html')) diff --git a/scripts/build/website_post.py b/scripts/build/website_post.py index 7e8ffefbd6..129c1217d3 100644 --- a/scripts/build/website_post.py +++ b/scripts/build/website_post.py @@ -153,7 +153,7 @@ for file in html_files: lang = '' # possibly necessary for automatic language selection file_symlink = file.replace(".html", ".en.html") - if (not (os.path.exists(file_symlink))): + if not os.path.lexists (file_symlink): os.symlink (file, file_symlink) elif (len(file_split) == 3): # it's a translation diff --git a/scripts/build/www_post.py b/scripts/build/www_post.py index 7ec91dd80b..784a978f20 100644 --- a/scripts/build/www_post.py +++ b/scripts/build/www_post.py @@ -82,7 +82,7 @@ for t in targets: for l in symlinks: p = mirrortree.new_link_path (os.path.normpath (os.readlink (l)), os.path.dirname (l), strip_re) dest = strip_file_name[t] (l) - if not os.path.exists (dest): + if not os.path.lexists (dest): os.symlink (p, dest)