Skip to content

Commit 3324e2e

Browse files
committed
fix path resolution issue at code edit tools
1 parent e9b7ee5 commit 3324e2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

patchwork/common/tools/code_edit_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def tool_records(self):
111111

112112
def __get_abs_path(self, path: str):
113113
abs_path = (self.repo_path / path.lstrip("/")).resolve()
114-
if not abs_path.is_relative_to(self.repo_path):
114+
if not abs_path.is_relative_to(self.repo_path.resolve()):
115115
raise ValueError(f"Path {path} contains illegal path traversal")
116116

117117
return abs_path

0 commit comments

Comments
 (0)