From 5b6625c1d9b8d6e1fe81566f18d165fd1c617610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=83=9F=E9=9B=80?= Date: Mon, 20 Jan 2025 16:40:22 +0800 Subject: [PATCH] fix drag file with err uri --- packages/core/src/browser/shell/application-shell.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/core/src/browser/shell/application-shell.ts b/packages/core/src/browser/shell/application-shell.ts index b13081abadb88..14032a5f638b4 100644 --- a/packages/core/src/browser/shell/application-shell.ts +++ b/packages/core/src/browser/shell/application-shell.ts @@ -574,13 +574,8 @@ 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: '' - }); + // no use fromComponents which cause error-formated-str + const fileUri = URI.fromFilePath(file.path); openUri(fileUri); } });