diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2025-04-30 15:13:26 -0400 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-08-01 16:28:09 +0300 |
| commit | b2a266b5d9fe8dca1cdace5fddeba618fc5cace0 (patch) | |
| tree | 0e8176d385138ecf8758db67bf8604bfd6865c0c /mesonbuild/mformat.py | |
| parent | 8cccad4f8b4e41a48e59fdbd8e3a18042e1245f8 (diff) | |
| download | meson-b2a266b5d9fe8dca1cdace5fddeba618fc5cace0.tar.gz | |
format: use absolute paths to find .editorconfig
Fixes #14538.
Resolve the source file path before searching .editorconfig files,
to ensure parents up to the root directory are visited.
Diffstat (limited to 'mesonbuild/mformat.py')
| -rw-r--r-- | mesonbuild/mformat.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mformat.py b/mesonbuild/mformat.py index 1e134f5cb..b9cdeb30c 100644 --- a/mesonbuild/mformat.py +++ b/mesonbuild/mformat.py @@ -837,7 +837,7 @@ class Formatter: # See https://editorconfig.org/ config = EditorConfig() - for p in source_file.parents: + for p in source_file.resolve().parents: editorconfig_file = p / '.editorconfig' if not editorconfig_file.exists(): continue |
