Guard against subdir segments in output files.

pull/386/head
Jussi Pakkanen 9 years ago
parent 819da091c2
commit bbe4656c51
  1. 2
      mesonbuild/interpreter.py
  2. 1
      test cases/failing/27 output subdir/foo.in
  3. 5
      test cases/failing/27 output subdir/meson.build
  4. 2
      test cases/failing/27 output subdir/subdir/dummy.txt

@ -1816,6 +1816,8 @@ class Interpreter():
raise InterpreterException('Input must be a string.')
if not isinstance(output, str):
raise InterpreterException('Output must be a string.')
if os.path.split(output)[0] != '':
raise InterpreterException('Output file name must not contain a subdirectory.')
if 'configuration' in kwargs:
conf = kwargs['configuration']
if not isinstance(conf, ConfigurationDataHolder):

@ -0,0 +1,5 @@
project('outdir path', 'c')
configure_file(input : 'foo.in',
output : 'subdir/foo',
configuration : configuration_data())

@ -0,0 +1,2 @@
I'm only here because Git is stupid about empty dirs.
Loading…
Cancel
Save