From 8057755374b3a3400a76559c71fb1a26f18b5f5a Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 25 Apr 2019 16:52:54 +0200 Subject: [PATCH] explorer: extenral dropped resources handling --- .../contrib/files/browser/views/explorerViewer.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts index 18300e1418b..6a46cb17e53 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts @@ -474,12 +474,6 @@ export class FileDragAndDrop implements ITreeDragAndDrop { if (typesArray.indexOf(DataTransfers.FILES.toLowerCase()) === -1 && typesArray.indexOf(CodeDataTransfers.FILES.toLowerCase()) === -1) { return false; } - if (this.environmentService.configuration.remoteAuthority) { - const resources = extractResources(originalEvent, true); - if (resources.some(r => r.resource.authority !== this.environmentService.configuration.remoteAuthority)) { - return false; - } - } } // Other-Tree DND @@ -612,6 +606,11 @@ export class FileDragAndDrop implements ITreeDragAndDrop { private handleExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise { const droppedResources = extractResources(originalEvent, true); + if (this.environmentService.configuration.remoteAuthority) { + if (droppedResources.some(r => r.resource.authority !== this.environmentService.configuration.remoteAuthority)) { + return Promise.resolve(); + } + } // Check for dropped external files to be folders return this.fileService.resolveAll(droppedResources).then(result => {