From 37ff26ec2c3df95433f41803ace92f142acf2c91 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Wed, 19 Apr 2023 20:58:14 +0200 Subject: [PATCH] fix(workspace): resolve symlinks in workspace path before checking --- autogpt/workspace.py | 1 + 1 file changed, 1 insertion(+) diff --git a/autogpt/workspace.py b/autogpt/workspace.py index 6fb0e311..724f8443 100644 --- a/autogpt/workspace.py +++ b/autogpt/workspace.py @@ -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):