diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-10-18 23:50:06 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-10-18 23:50:06 +0300 |
commit | 2305df24142ea779f159beed4ba758969ccb1a88 (patch) | |
tree | 146fa02f6e840f74174ab90c1bd4e09c906b2ce6 | |
parent | fd860482e57b94a3a57e10a57f374cb46d516d40 (diff) | |
download | meson-subprojdirname.tar.gz |
Because people are very creative in working around limitations based on good faith.subprojdirname
-rw-r--r-- | mesonbuild/interpreter.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index bfd946aeb..3c542c2d5 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1824,7 +1824,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 |