File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,13 @@ class InfrastructureTextFileSystemProvider implements IFileSystemProviderWithFil
8585
8686 private cachedContent : Map < string , Promise < string | undefined > > = new Map ( )
8787 private async getFileContent ( resource : monaco . Uri ) : Promise < string | undefined > {
88- if ( ! this . cachedContent . has ( resource . toString ( ) ) && resource . toString ( ) . includes ( '.' ) ) {
88+ const REMOTE_FILE_BLACKLIST = [ '.git/config' , '.vscode' , monaco . Uri . parse ( this . infrastructure . rootUri ) . path ]
89+
90+ const blacklisted = REMOTE_FILE_BLACKLIST . some ( blacklisted => resource . path . endsWith ( blacklisted ) )
91+ if ( blacklisted ) {
92+ return undefined
93+ }
94+ if ( ! this . cachedContent . has ( resource . toString ( ) ) ) {
8995 this . cachedContent . set ( resource . toString ( ) , this . infrastructure . getFileContent ! ( resource , this . languageClientManager ) )
9096 }
9197 return await this . cachedContent . get ( resource . toString ( ) )
You can’t perform that action at this time.
0 commit comments