diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-09 19:45:42 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-05-01 19:57:26 -0400 |
commit | e6e8159980e9a4c816223fcdac8c729d104c0c02 (patch) | |
tree | 20e1c792645e40953939324d594b32765997ff8a | |
parent | 99ad11bd9c3249f548dda0b275d9f8dd1b3f6d14 (diff) | |
download | meson-e6e8159980e9a4c816223fcdac8c729d104c0c02.zip meson-e6e8159980e9a4c816223fcdac8c729d104c0c02.tar.gz meson-e6e8159980e9a4c816223fcdac8c729d104c0c02.tar.bz2 |
use shared implementation to convert files() strings to File objects
This handles various edge cases:
- checks for sandbox violations just like all other functions
- warn for direntry issues
- check for generated files referred to via strings instead of the
returned object
(All valid use cases for wanting to sneak around the checks, are made to
work via commit bba588d8b03a9125bf5c4faaad31b70d39242b68.)
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 6058838..b3c7e23 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -619,7 +619,7 @@ class Interpreter(InterpreterBase, HoldableObject): @typed_pos_args('files', varargs=str) @noKwargs def func_files(self, node: mparser.FunctionNode, args: T.Tuple[T.List[str]], kwargs: 'TYPE_kwargs') -> T.List[mesonlib.File]: - return [mesonlib.File.from_source_file(self.environment.source_dir, self.subdir, fname) for fname in args[0]] + return self.source_strings_to_files(args[0]) # Used by declare_dependency() and pkgconfig.generate() def extract_variables(self, kwargs, argname='variables', list_new=False, dict_new=False): |