From 5d88c45861bd5d1f60baa9967fffb843c4a162d1 Mon Sep 17 00:00:00 2001 From: Andrei Alexeyev Date: Fri, 23 Jul 2021 17:18:57 +0300 Subject: [PATCH] msubprojects: do not follow symlinks when purging Fixes #8891 --- mesonbuild/msubprojects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index 269f0feba..656f9a2c7 100755 --- a/mesonbuild/msubprojects.py +++ b/mesonbuild/msubprojects.py @@ -430,7 +430,8 @@ class Runner: except FileNotFoundError: pass - subproject_source_dir = Path(self.repo_dir).resolve() + # NOTE: Do not use .resolve() here; the subproject directory may be a symlink + subproject_source_dir = Path(self.repo_dir) # Don't follow symlink. This is covered by the next if statement, but why # not be doubly sure.