aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/yelphelper.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/scripts/yelphelper.py')
-rw-r--r--mesonbuild/scripts/yelphelper.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/scripts/yelphelper.py b/mesonbuild/scripts/yelphelper.py
index 2623790..978a870 100644
--- a/mesonbuild/scripts/yelphelper.py
+++ b/mesonbuild/scripts/yelphelper.py
@@ -81,7 +81,11 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr
if '/' in m or '\\' in m:
os.makedirs(os.path.dirname(outfile), exist_ok=True)
try:
- os.symlink(srcfile, outfile)
+ try:
+ os.symlink(srcfile, outfile)
+ except FileExistsError:
+ os.remove(outfile)
+ os.symlink(srcfile, outfile)
continue
except (NotImplementedError, OSError):
mlog.warning('Symlinking not supported, falling back to copying')