From ecf65d3d6dfe61398200ec9c7ace432d5e668f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=83=9F=E9=9B=80?= <95375182+yanquer@users.noreply.github.com> Date: Thu, 23 Jan 2025 00:18:44 +0800 Subject: [PATCH] Fix URI construction for file drag & drop (#14746) --- packages/core/src/browser/shell/application-shell.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/core/src/browser/shell/application-shell.ts b/packages/core/src/browser/shell/application-shell.ts index b13081abadb88..7336a6fd2ea93 100644 --- a/packages/core/src/browser/shell/application-shell.ts +++ b/packages/core/src/browser/shell/application-shell.ts @@ -574,13 +574,7 @@ export class ApplicationShell extends Widget { // the files were dragged from the outside the workspace Array.from(event.dataTransfer.files).forEach(file => { if (file.path) { - const fileUri = URI.fromComponents({ - scheme: 'file', - path: file.path, - authority: '', - query: '', - fragment: '' - }); + const fileUri = URI.fromFilePath(file.path); openUri(fileUri); } });