We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a449148 commit bbce24dCopy full SHA for bbce24d
extensions/markdown-language-features/src/languageFeatures/pathCompletions.ts
@@ -287,7 +287,13 @@ export class MdVsCodePathCompletionProvider implements vscode.CompletionItemProv
287
const pathSegmentEnd = position.translate({ characterDelta: context.linkSuffix.length });
288
const replacementRange = new vscode.Range(pathSegmentStart, pathSegmentEnd);
289
290
- const dirInfo = await this.workspace.readDirectory(parentDir);
+ let dirInfo: [string, vscode.FileType][];
291
+ try {
292
+ dirInfo = await this.workspace.readDirectory(parentDir);
293
+ } catch {
294
+ return;
295
+ }
296
+
297
for (const [name, type] of dirInfo) {
298
// Exclude paths that start with `.`
299
if (name.startsWith('.')) {
0 commit comments