From 8b984cd672b24f530ccecef2901ab15b0c13dffe Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Tue, 15 Jul 2025 19:19:25 +0200 Subject: [PATCH] fix: fix empty basepath --- internal/lsp/watcher/watcher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/lsp/watcher/watcher.go b/internal/lsp/watcher/watcher.go index 5bd016eebe413a17acca29ef628612825d40b923..7297ff71fa43a79a9a821ffda261220bab210ddc 100644 --- a/internal/lsp/watcher/watcher.go +++ b/internal/lsp/watcher/watcher.go @@ -606,6 +606,9 @@ func (w *WorkspaceWatcher) matchesPattern(path string, pattern protocol.GlobPatt return fullPathMatch || baseNameMatch } + if basePath == "" { + return false + } // For relative patterns basePath = protocol.DocumentUri(basePath).Path() basePath = filepath.ToSlash(basePath)