Skip to content

Commit f6370dc

Browse files
committed
Update FileSystemProvider.ts
1 parent 78c1822 commit f6370dc

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/providers/FileSystemProvider/FileSystemProvider.ts

-12
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
234234
}
235235

236236
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-
}
240237
let entryPromise: Promise<Entry>;
241238
let result: Entry;
242239
const redirectedUri = redirectDotvscodeRoot(uri);
@@ -421,9 +418,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
421418
}
422419

423420
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-
}
427421
// Use _lookup() instead of _lookupAsFile() so we send
428422
// our cached mtime with the GET /doc request if we have it
429423
return this._lookup(uri, true).then((file: File) => {
@@ -442,9 +436,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
442436
overwrite: boolean;
443437
}
444438
): 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-
}
448439
uri = redirectDotvscodeRoot(uri);
449440
if (uri.path.startsWith("/.")) {
450441
throw vscode.FileSystemError.NoPermissions("dot-folders not supported by server");
@@ -612,9 +603,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
612603
}
613604

614605
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-
}
618606
uri = redirectDotvscodeRoot(uri);
619607
const { project } = isfsConfig(uri);
620608
const csp = isCSP(uri);

0 commit comments

Comments
 (0)