aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
diff options
context:
space:
mode:
authorNicolas Schneider <nioncode+git@gmail.com>2016-02-24 00:40:14 +0100
committerNicolas Schneider <nioncode+git@gmail.com>2016-02-24 00:40:14 +0100
commit6de2fd6ab5ce5301e840563d2898a82e18543bf0 (patch)
treecaa7758bbf7fbb0c9db39fb6dc318265ca919036 /mesonbuild/backend/vs2010backend.py
parent32b43e77abed69851c10577946068a0c029be908 (diff)
downloadmeson-6de2fd6ab5ce5301e840563d2898a82e18543bf0.zip
meson-6de2fd6ab5ce5301e840563d2898a82e18543bf0.tar.gz
meson-6de2fd6ab5ce5301e840563d2898a82e18543bf0.tar.bz2
vs2010: fix target_to_build_root method
Python's os.path.split() does not split the path into its components. Instead, split the path with str.split() using the OS's file system separator.
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r--mesonbuild/backend/vs2010backend.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index c9fe09f..a9567f4 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -217,10 +217,8 @@ class Vs2010Backend(backends.Backend):
if target.subdir == '':
return ''
- directories = os.path.split(target.subdir)
- directories = list(filter(bool,directories)) #Filter out empty strings
-
- return '/'.join(['..']*len(directories))
+ directories = target.subdir.split(os.sep)
+ return os.sep.join(['..']*len(directories))
def special_quote(self, arr):
return ['&quot;%s&quot;' % i for i in arr]