2018-03-05 05:57:38 +00:00
|
|
|
--- a/mesonbuild/coredata.py
|
|
|
|
+++ b/mesonbuild/coredata.py
|
2021-02-20 14:25:04 +00:00
|
|
|
@@ -506,7 +506,6 @@ class CoreData:
|
2020-04-16 03:42:45 +01:00
|
|
|
return value
|
2021-02-20 14:25:04 +00:00
|
|
|
if option.name.endswith('dir') and value.is_absolute() and \
|
|
|
|
option not in BULITIN_DIR_NOPREFIX_OPTIONS:
|
2018-03-05 05:57:38 +00:00
|
|
|
- # Value must be a subdir of the prefix
|
|
|
|
# commonpath will always return a path in the native format, so we
|
|
|
|
# must use pathlib.PurePath to do the same conversion before
|
|
|
|
# comparing.
|
2021-02-20 14:25:04 +00:00
|
|
|
@@ -518,7 +517,7 @@ class CoreData:
|
2020-04-16 03:42:45 +01:00
|
|
|
try:
|
|
|
|
value = value.relative_to(prefix)
|
|
|
|
except ValueError:
|
|
|
|
- raise MesonException(msg.format(option, value, prefix))
|
|
|
|
+ pass
|
|
|
|
if '..' in str(value):
|
|
|
|
raise MesonException(msg.format(option, value, prefix))
|
|
|
|
return value.as_posix()
|