From 4c5bb83fc11b71664783c6abd081ff318663f107 Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 25 Apr 2019 15:16:53 -0500 Subject: [PATCH] Fix open dialog crash when there is a broken link Fixes #579. --- packages/vscode/src/dialog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vscode/src/dialog.ts b/packages/vscode/src/dialog.ts index 734626cb..4ec06306 100644 --- a/packages/vscode/src/dialog.ts +++ b/packages/vscode/src/dialog.ts @@ -404,7 +404,7 @@ class Dialog { */ private async list(directory: string): Promise> { const paths = (await util.promisify(fs.readdir)(directory)).sort(); - const stats = await Promise.all(paths.map(p => util.promisify(fs.stat)(path.join(directory, p)))); + const stats = await Promise.all(paths.map(p => util.promisify(fs.lstat)(path.join(directory, p)))); return stats.map((stat, index): DialogEntry => ({ fullPath: path.join(directory, paths[index]),