From 9a4ff4713aae94e3f12367f18af77c1560940e4c Mon Sep 17 00:00:00 2001 From: scorpio Date: Tue, 10 Mar 2026 09:34:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=20glob=20=E5=87=BD?= =?UTF-8?q?=E6=95=B0=20pattern=20=E5=8F=82=E6=95=B0=E7=9A=84=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/room/tools/executor.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/room/tools/executor.go b/internal/room/tools/executor.go index 7a30b48..a925651 100644 --- a/internal/room/tools/executor.go +++ b/internal/room/tools/executor.go @@ -66,6 +66,11 @@ func (e *Executor) glob(args string) (string, error) { return "", err } + _, err := e.safePath(a.Pattern) + if err != nil { + return "", err + } + pattern := filepath.Join(e.workspaceDir, a.Pattern) files, err := filepath.Glob(pattern) if err != nil {