Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/vs/platform/files/browser/htmlFileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,12 @@ export class HTMLFileSystemProvider implements IFileSystemProviderWithFileReadWr
return handle;
}

const parent = await this.getDirectoryHandle(this.extUri.dirname(resource));
const parentUri = this.extUri.dirname(resource);
if (this.extUri.isEqual(parentUri, resource)) {
return undefined; // return when root is reached to prevent infinite recursion
}

const parent = await this.getDirectoryHandle(parentUri);

try {
return await parent?.getDirectoryHandle(extUri.basename(resource));
Expand Down