Skip to content

Commit

Permalink
fix: prevent matching files with same prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed May 7, 2024
1 parent 5ef2aa7 commit b92aaf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service-override/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class RegisteredFileSystemProvider extends Disposable implements IFileSystemProv
public async readdir (resource: URI): Promise<[string, FileType][]> {
const includedPaths = Array.from(this.files.keys())
.map(uri => URI.parse(uri))
.filter(uri => uri.path.startsWith(resource.path))
.filter(uri => uri.path.startsWith(resource.path + '/'))
.map(uri => extUri.relativePath(resource, uri)!)

const files = includedPaths.filter(path => !path.includes('/'))
Expand Down

0 comments on commit b92aaf6

Please sign in to comment.