mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
tweak download url dnd
This commit is contained in:
parent
8ddffb5cd2
commit
abf0a5bfc9
|
@ -367,8 +367,8 @@ export function fillResourceDataTransfers(accessor: ServicesAccessor, resources:
|
|||
const lineDelimiter = isWindows ? '\r\n' : '\n';
|
||||
event.dataTransfer.setData(DataTransfers.TEXT, sources.map(source => source.resource.scheme === Schemas.file ? getPathLabel(source.resource) : source.resource.toString()).join(lineDelimiter));
|
||||
|
||||
// Download URL: enables support to drag a tab as file to desktop (only single file supported, not directories)
|
||||
if (sources.length === 1 && firstSource.resource.scheme === Schemas.file && !firstSource.isDirectory) {
|
||||
// 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.fsPath), firstSource.resource.toString()].join(':'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue