Skip to content

Commit 8d4dae0

Browse files
author
Loïc Mangeonjean
committed
fix: allow fetching file outside root uri
1 parent b11da96 commit 8d4dae0

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/extensions.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ class InfrastructureTextFileSystemProvider implements IFileSystemProviderWithFil
9292
}
9393

9494
async readFile (resource: monaco.Uri): Promise<Uint8Array> {
95-
if (!resource.toString().startsWith(this.infrastructure.rootUri)) {
96-
throw FileSystemProviderError.create('file not found', FileSystemProviderErrorCode.FileNotFound)
97-
}
9895
const content = await this.getFileContent(resource)
9996
return encoder.encode(content)
10097
}
@@ -112,9 +109,6 @@ class InfrastructureTextFileSystemProvider implements IFileSystemProviderWithFil
112109
}
113110

114111
async stat (resource: monaco.Uri): Promise<IStat> {
115-
if (!resource.toString().startsWith(this.infrastructure.rootUri)) {
116-
throw FileSystemProviderError.create('file not found', FileSystemProviderErrorCode.FileNotFound)
117-
}
118112
try {
119113
const content = await this.getFileContent(resource)
120114
if (content != null) {

0 commit comments

Comments
 (0)