From 631e8059d6c88d6b6ce1f5e95cfc9f1be007c0b0 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 11 Sep 2019 12:20:17 +0200 Subject: [PATCH] fixes #80616 --- src/vs/workbench/contrib/files/browser/fileActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index cb3afb6e658..dac029fe35a 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -911,7 +911,7 @@ async function openExplorerAndCreate(accessor: ServicesAccessor, isFolder: boole const { stat } = getContext(list); let folder: ExplorerItem; if (stat) { - folder = stat.isDirectory ? stat : stat.parent!; + folder = stat.isDirectory ? stat : (stat.parent || explorerService.roots[0]); } else { folder = explorerService.roots[0]; } -- GitLab