Skip to content

Commit

Permalink
Do not allow workspace folders with scheme different than the current…
Browse files Browse the repository at this point in the history
… remote scheme
  • Loading branch information
isidorn committed Jun 11, 2019
1 parent 0ac3c44 commit 0e6822b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ export class WorkspaceEditingService implements IWorkspaceEditingService {

private async doAddFolders(foldersToAdd: IWorkspaceFolderCreationData[], index?: number, donotNotifyError: boolean = false): Promise<void> {
const state = this.contextService.getWorkbenchState();
if (this.environmentService.configuration.remoteAuthority) {
// Do not allow workspace folders with scheme different than the current remote scheme
const schemas = this.contextService.getWorkspace().folders.map(f => f.uri.scheme);
foldersToAdd = foldersToAdd.filter(f => schemas.indexOf(f.uri.scheme) >= 0);
}

// If we are in no-workspace or single-folder workspace, adding folders has to
// enter a workspace.
Expand Down

0 comments on commit 0e6822b

Please sign in to comment.