Fix duplicate files opening with folder parameter

Reworked from d574012871e58e503801f869fab5e3d3a4052390 to fit in the
new structure.
This commit is contained in:
Asher
2020-02-13 12:04:22 -06:00
parent ac4f2b8215
commit cc79edb312
2 changed files with 66 additions and 16 deletions

View File

@ -211,6 +211,46 @@ index 2c64061da7..c0ef8faedd 100644
} catch (err) {
// Do nothing. If we can't read the file we have no
// language pack config.
diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts
index a599f5a7eb..ec7ccd43f8 100644
--- a/src/vs/code/browser/workbench/workbench.ts
+++ b/src/vs/code/browser/workbench/workbench.ts
@@ -298,35 +298,6 @@ class WorkspaceProvider implements IWorkspaceProvider {
let workspace: IWorkspace;
let payload = Object.create(null);
- const query = new URL(document.location.href).searchParams;
- query.forEach((value, key) => {
- switch (key) {
-
- // Folder
- case WorkspaceProvider.QUERY_PARAM_FOLDER:
- workspace = { folderUri: URI.parse(value) };
- foundWorkspace = true;
- break;
-
- // Workspace
- case WorkspaceProvider.QUERY_PARAM_WORKSPACE:
- workspace = { workspaceUri: URI.parse(value) };
- foundWorkspace = true;
- break;
-
- // Empty
- case WorkspaceProvider.QUERY_PARAM_EMPTY_WINDOW:
- workspace = undefined;
- foundWorkspace = true;
- break;
-
- // Payload
- case WorkspaceProvider.QUERY_PARAM_PAYLOAD:
- payload = JSON.parse(value);
- break;
- }
- });
-
// If no workspace is provided through the URL, check for config attribute from server
if (!foundWorkspace) {
if (config.folderUri) {
diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts
index abd1e33b18..bf75952ce1 100644
--- a/src/vs/platform/environment/common/environment.ts