gnome.yelp(): Handle file existing on symlink

Fixes #1921
pull/1924/head
Patrick Griffis 8 years ago
parent 616c4c3a35
commit 7764c0a7fa
  1. 4
      mesonbuild/scripts/yelphelper.py

@ -81,6 +81,10 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr
if '/' in m or '\\' in m: if '/' in m or '\\' in m:
os.makedirs(os.path.dirname(outfile), exist_ok=True) os.makedirs(os.path.dirname(outfile), exist_ok=True)
try: try:
try:
os.symlink(srcfile, outfile)
except FileExistsError:
os.remove(outfile)
os.symlink(srcfile, outfile) os.symlink(srcfile, outfile)
continue continue
except (NotImplementedError, OSError): except (NotImplementedError, OSError):

Loading…
Cancel
Save