Skip to content

Commit 7329053

Browse files
committed
Fix open dialog crash when there is a broken link
Fixes #579.
1 parent b8f1ca7 commit 7329053

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vscode/src/dialog.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class Dialog {
404404
*/
405405
private async list(directory: string): Promise<ReadonlyArray<DialogEntry>> {
406406
const paths = (await util.promisify(fs.readdir)(directory)).sort();
407-
const stats = await Promise.all(paths.map(p => util.promisify(fs.stat)(path.join(directory, p))));
407+
const stats = await Promise.all(paths.map(p => util.promisify(fs.lstat)(path.join(directory, p))));
408408

409409
return stats.map((stat, index): DialogEntry => ({
410410
fullPath: path.join(directory, paths[index]),

0 commit comments

Comments
 (0)