提交 0ac3c44c 编写于 作者: I isidor

explorer: enable dnd for more cases (remote)

上级 f1e01146
......@@ -328,9 +328,7 @@ export function fillResourceDataTransfers(accessor: ServicesAccessor, resources:
event.dataTransfer.setData(DataTransfers.TEXT, sources.map(source => source.resource.scheme === Schemas.file ? normalize(normalizeDriveLetter(source.resource.fsPath)) : source.resource.toString()).join(lineDelimiter));
// Download URL: enables support to drag a tab as file to desktop (only single file supported)
if (firstSource.resource.scheme === Schemas.file) {
event.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, basename(firstSource.resource), firstSource.resource.toString()].join(':'));
}
event.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, basename(firstSource.resource), firstSource.resource.toString()].join(':'));
// Resource URLs: allows to drop multiple resources to a target in VS Code (not directories)
const files = sources.filter(s => !s.isDirectory);
......
......@@ -606,12 +606,6 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
private handleExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> {
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 => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册