fix(workspace): resolve symlinks in workspace path before checking

This commit is contained in:
Reinier van der Leer
2023-04-19 20:58:14 +02:00
parent a2723f16f2
commit 37ff26ec2c

View File

@@ -37,6 +37,7 @@ def safe_path_join(base: Path, *paths: str | Path) -> Path:
Returns:
Path: The joined path
"""
base = base.resolve()
joined_path = base.joinpath(*paths).resolve()
if CFG.restrict_to_workspace and not joined_path.is_relative_to(base):