From e49434bb5ad3acdf12ea9f257aa034e698f2d6c7 Mon Sep 17 00:00:00 2001 From: Heyward Fann Date: Fri, 8 Dec 2023 18:24:00 +0800 Subject: [PATCH] fix(core): disable cached-dir for resolving root --- src/core/workspaceFolder.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/workspaceFolder.ts b/src/core/workspaceFolder.ts index 6dd0fb69564..19922717ed7 100644 --- a/src/core/workspaceFolder.ts +++ b/src/core/workspaceFolder.ts @@ -155,8 +155,6 @@ export default class WorkspaceFolderController { public resolveRoot(document: Document, cwd: string, fireEvent: boolean, expand: ((input: string) => string)): string | null { if (document.buftype !== '' || document.schema !== 'file') return null let u = URI.parse(document.uri) - let curr = this.getWorkspaceFolder(u) - if (curr) return URI.parse(curr.uri).fsPath let dir = isDirectory(u.fsPath) ? path.normalize(u.fsPath) : path.dirname(u.fsPath) let { ignoredFiletypes, ignoredFolders, workspaceFolderCheckCwd, workspaceFolderFallbackCwd, bottomUpFiletypes } = this.config if (ignoredFiletypes?.includes(document.filetype)) return null