@@ -234,9 +234,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
234
234
}
235
235
236
236
public async stat ( uri : vscode . Uri ) : Promise < vscode . FileStat > {
237
- if ( uri . path . includes ( ".vscode/" ) && ! uri . path . endsWith ( "/settings.json" ) ) {
238
- throw vscode . FileSystemError . NoPermissions ( "Only settings.json is allowed within the /.vscode directory" ) ;
239
- }
240
237
let entryPromise : Promise < Entry > ;
241
238
let result : Entry ;
242
239
const redirectedUri = redirectDotvscodeRoot ( uri ) ;
@@ -421,9 +418,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
421
418
}
422
419
423
420
public async readFile ( uri : vscode . Uri ) : Promise < Uint8Array > {
424
- if ( uri . path . includes ( ".vscode/" ) && ! uri . path . endsWith ( "/settings.json" ) ) {
425
- throw vscode . FileSystemError . NoPermissions ( "Only settings.json is allowed within the /.vscode directory" ) ;
426
- }
427
421
// Use _lookup() instead of _lookupAsFile() so we send
428
422
// our cached mtime with the GET /doc request if we have it
429
423
return this . _lookup ( uri , true ) . then ( ( file : File ) => {
@@ -442,9 +436,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
442
436
overwrite : boolean ;
443
437
}
444
438
) : void | Thenable < void > {
445
- if ( uri . path . includes ( ".vscode/" ) && ! uri . path . endsWith ( "/settings.json" ) ) {
446
- throw vscode . FileSystemError . NoPermissions ( "Only settings.json is allowed within the /.vscode directory" ) ;
447
- }
448
439
uri = redirectDotvscodeRoot ( uri ) ;
449
440
if ( uri . path . startsWith ( "/." ) ) {
450
441
throw vscode . FileSystemError . NoPermissions ( "dot-folders not supported by server" ) ;
@@ -612,9 +603,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
612
603
}
613
604
614
605
public async delete ( uri : vscode . Uri , options : { recursive : boolean } ) : Promise < void > {
615
- if ( uri . path . includes ( ".vscode/" ) && ! uri . path . endsWith ( "/settings.json" ) ) {
616
- throw vscode . FileSystemError . NoPermissions ( "Only settings.json is allowed within the /.vscode directory" ) ;
617
- }
618
606
uri = redirectDotvscodeRoot ( uri ) ;
619
607
const { project } = isfsConfig ( uri ) ;
620
608
const csp = isCSP ( uri ) ;
0 commit comments