aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-10-18 23:50:06 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-10-24 23:01:57 +0300
commitc178a5766b38d49f5fe44abcf2aa945e1156cf4f (patch)
tree9c57453113a0b56a34dba8f591ab99612f164656 /mesonbuild
parenta3da9f77c4831276bb4c10c01330a357de3217a5 (diff)
downloadmeson-c178a5766b38d49f5fe44abcf2aa945e1156cf4f.zip
meson-c178a5766b38d49f5fe44abcf2aa945e1156cf4f.tar.gz
meson-c178a5766b38d49f5fe44abcf2aa945e1156cf4f.tar.bz2
Because people are very creative in working around limitations based on good faith.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index e385a88..d9ab733 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1826,7 +1826,12 @@ to directly access options of other subprojects.''')
if self.subproject in self.build.projects:
raise InvalidCode('Second call to project().')
if not self.is_subproject() and 'subproject_dir' in kwargs:
- self.subproject_dir = kwargs['subproject_dir']
+ spdirname = kwargs['subproject_dir']
+ if '/' in spdirname or '\\' in spdirname:
+ raise InterpreterException('Subproject_dir must not contain a path segment.')
+ if spdirname.startswith('.'):
+ raise InterpreterException('Subproject_dir must not begin with a period.')
+ self.subproject_dir = spdirname
if 'meson_version' in kwargs:
cv = coredata.version