提交 84df32c7 编写于 作者: B Benjamin Pasero

fixes #16882

上级 424812d9
......@@ -137,7 +137,19 @@ export class ElectronWindow {
DOM.EventHelper.stop(e, true);
this.focus(); // make sure this window has focus so that the open call reaches the right window!
this.windowsService.openWindow(draggedExternalResources.map(r => r.fsPath), { forceReuseWindow: true });
// Ask the user when opening a potential large number of folders
let doOpen = true;
if (draggedExternalResources.length > 20) {
doOpen = this.messageService.confirm({
message: nls.localize('confirmOpen', "Are you sure you want to open '{0}' folders?", draggedExternalResources.length),
primaryButton: nls.localize({ key: 'confirmOpenButton', comment: ['&& denotes a mnemonic'] }, "&&Open")
});
}
if (doOpen) {
this.windowsService.openWindow(draggedExternalResources.map(r => r.fsPath), { forceReuseWindow: true });
}
cleanUp();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册