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.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/scripts/yelphelper.py b/mesonbuild/scripts/yelphelper.py
index ab99267..0f8b0b8 100644
--- a/mesonbuild/scripts/yelphelper.py
+++ b/mesonbuild/scripts/yelphelper.py
@@ -17,6 +17,7 @@ import subprocess
import shutil
import argparse
from .. import mlog
+from ..mesonlib import has_path_sep
from . import destdir_join
from .gettext import read_linguas
@@ -79,7 +80,7 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr
elif symlinks:
srcfile = os.path.join(c_install_dir, m)
mlog.log('Symlinking %s to %s.' % (outfile, srcfile))
- if '/' in m or '\\' in m:
+ if has_path_sep(m):
os.makedirs(os.path.dirname(outfile), exist_ok=True)
try:
try:
@@ -94,7 +95,7 @@ def install_help(srcdir, blddir, sources, media, langs, install_dir, destdir, pr
# Lang doesn't have media file so copy it over 'C' one
infile = os.path.join(srcdir, 'C', m)
mlog.log('Installing %s to %s' % (infile, outfile))
- if '/' in m or '\\' in m:
+ if has_path_sep(m):
os.makedirs(os.path.dirname(outfile), exist_ok=True)
shutil.copyfile(infile, outfile)
shutil.copystat(infile, outfile)