From 28b302752272fe33fe612c69a8e27fa1e09ef9ea Mon Sep 17 00:00:00 2001 From: Bill Schnurr Date: Fri, 6 Dec 2024 12:06:59 -0800 Subject: [PATCH] add a guard around rootpath. (#8088) this spot was missed last time. also update debugpy --- .../PythonTools/LanguageServerClient/PythonLanguageClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/Product/PythonTools/PythonTools/LanguageServerClient/PythonLanguageClient.cs b/Python/Product/PythonTools/PythonTools/LanguageServerClient/PythonLanguageClient.cs index 023b24ee37..b9d3727bd3 100644 --- a/Python/Product/PythonTools/PythonTools/LanguageServerClient/PythonLanguageClient.cs +++ b/Python/Product/PythonTools/PythonTools/LanguageServerClient/PythonLanguageClient.cs @@ -524,7 +524,7 @@ private void WatchedFilesRegistered(object sender, DidChangeWatchedFilesRegistra private void UpdateInterpreterExcludes() { this._clientContexts.ForEach(context => { - if (PathUtils.IsSubpathOf(context.RootPath, context.InterpreterConfiguration.InterpreterPath)) { + if (context.RootPath != null && PathUtils.IsSubpathOf(context.RootPath, context.InterpreterConfiguration.InterpreterPath)) { var pattern = CommonUtils.GetRelativeFilePath(context.RootPath, context.InterpreterConfiguration.GetPrefixPath()).TrimEnd('\\') + "/**/*"; var watcher = new FileSystemWatcher() { GlobPattern = pattern }; this._fileListener.AddExclude(watcher);