diff options
author | Hemmo Nieminen <hemmo.nieminen@kone.com> | 2022-06-17 00:00:00 +0300 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-06-17 14:18:05 -0400 |
commit | b49b9f52b29896cce58a1e3dbeb1b6cf54420d45 (patch) | |
tree | bca9182a5c6a739af01805f2cb63d82b3c60b146 /mesonbuild/interpreter | |
parent | 9b2142800658e2a63def39f2cfb1ec4cb18795bd (diff) | |
download | meson-b49b9f52b29896cce58a1e3dbeb1b6cf54420d45.zip meson-b49b9f52b29896cce58a1e3dbeb1b6cf54420d45.tar.gz meson-b49b9f52b29896cce58a1e3dbeb1b6cf54420d45.tar.bz2 |
interpreter: fix a subproject check with symlinks
The check for whether or not a file is allowed to be accessed from a
subproject fails if the subproject is accessed via a symlink. Use the
absolute path of the subproject without resolving symlinks to fix the
check.
Extend unit test 106 to check for this in the future.
Diffstat (limited to 'mesonbuild/interpreter')
-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 3bf9b42..5cadf52 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -684,7 +684,7 @@ class Interpreter(InterpreterBase, HoldableObject): else: if not self.is_subproject() and srcdir / self.subproject_dir in p.parents: continue - if p.is_absolute() and p.is_dir() and srcdir / self.root_subdir in [p] + list(p.resolve().parents): + if p.is_absolute() and p.is_dir() and srcdir / self.root_subdir in [p] + list(Path(os.path.abspath(p)).parents): variables[k] = P_OBJ.DependencyVariableString(v) for d in deps: if not isinstance(d, dependencies.Dependency): |