From 3b28f15f1c5b06e46ab02736af53c0118bee2102 Mon Sep 17 00:00:00 2001 From: Anders Eknert Date: Tue, 9 Apr 2024 17:28:01 +0200 Subject: [PATCH] fix: avoid panic in walkdir traversal Fixes #627 Signed-off-by: Anders Eknert --- internal/lsp/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/lsp/server.go b/internal/lsp/server.go index c58d89d5..e5bfd249 100644 --- a/internal/lsp/server.go +++ b/internal/lsp/server.go @@ -625,7 +625,7 @@ func (l *LanguageServer) loadWorkspaceContents() error { err := filepath.WalkDir(workspaceRootPath, func(path string, d os.DirEntry, err error) error { if err != nil { - return fmt.Errorf("failed to walk workspace dir %q: %w", d.Name(), err) + return fmt.Errorf("failed to walk workspace dir %q: %w", path, err) } // TODO(charlieegan3): make this configurable for things like .rq etc?