summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Weißmann <volker.weissmann@gmx.de>2023-08-06 17:45:47 +0200
committerDylan Baker <dylan@pnwbakers.com>2025-07-18 10:08:26 -0700
commit747afbb2459365be2ca3fd4bd2cb1e870b1accb3 (patch)
treed675439b92ac1dc07c56bbea79caeac719739f0a
parentff963e657cf1151cf002efc123563cb40dabab11 (diff)
downloadmeson-747afbb2459365be2ca3fd4bd2cb1e870b1accb3.tar.gz
Use os.path.normpath to make paths prettier
`meson.py introspect build --targets` should show `/path/to/project/hello.c` instead of `/path/to/project/subdir/../hello.c` if /path/to/project/meson.build contains subdir('subdir') and /path/to/project/subdir/meson.build contains executable('hello', '../hello.c').
-rw-r--r--mesonbuild/utils/universal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py
index 4b656a670..06283106a 100644
--- a/mesonbuild/utils/universal.py
+++ b/mesonbuild/utils/universal.py
@@ -433,7 +433,7 @@ class File(HoldableObject):
absdir = srcdir
if self.is_built:
absdir = builddir
- return os.path.join(absdir, self.relative_name())
+ return os.path.normpath(os.path.join(absdir, self.relative_name()))
@property
def suffix(self) -> str: