fix(workspace): resolve symlinks in workspace path before checking
parent
a2723f16f2
commit
37ff26ec2c
|
@ -37,6 +37,7 @@ def safe_path_join(base: Path, *paths: str | Path) -> Path:
|
||||||
Returns:
|
Returns:
|
||||||
Path: The joined path
|
Path: The joined path
|
||||||
"""
|
"""
|
||||||
|
base = base.resolve()
|
||||||
joined_path = base.joinpath(*paths).resolve()
|
joined_path = base.joinpath(*paths).resolve()
|
||||||
|
|
||||||
if CFG.restrict_to_workspace and not joined_path.is_relative_to(base):
|
if CFG.restrict_to_workspace and not joined_path.is_relative_to(base):
|
||||||
|
|
Loading…
Reference in New Issue