File tree Expand file tree Collapse file tree
src/vs/workbench/services/workspaces/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import { mnemonicButtonLabel } from 'vs/base/common/labels';
2323import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
2424import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles' ;
2525import { IHostService } from 'vs/workbench/services/host/browser/host' ;
26+ import { Schemas } from 'vs/base/common/network' ;
2627
2728export abstract class AbstractWorkspaceEditingService implements IWorkspaceEditingService {
2829
@@ -127,13 +128,10 @@ export abstract class AbstractWorkspaceEditingService implements IWorkspaceEditi
127128
128129 private async doAddFolders ( foldersToAdd : IWorkspaceFolderCreationData [ ] , index ?: number , donotNotifyError : boolean = false ) : Promise < void > {
129130 const state = this . contextService . getWorkbenchState ( ) ;
130- if ( this . environmentService . configuration . remoteAuthority ) {
131-
132- // Do not allow workspace folders with scheme different than the current remote scheme
133- const schemas = this . contextService . getWorkspace ( ) . folders . map ( f => f . uri . scheme ) ;
134- if ( schemas . length && foldersToAdd . some ( f => schemas . indexOf ( f . uri . scheme ) === - 1 ) ) {
135- throw new Error ( nls . localize ( 'differentSchemeRoots' , "Workspace folders from different providers are not allowed in the same workspace." ) ) ;
136- }
131+ const remoteAuthority = this . environmentService . configuration . remoteAuthority ;
132+ if ( remoteAuthority ) {
133+ // https://github.com/microsoft/vscode/issues/94191
134+ foldersToAdd = foldersToAdd . filter ( f => f . uri . scheme !== Schemas . file && ( f . uri . scheme !== Schemas . vscodeRemote || f . uri . authority === remoteAuthority ) ) ;
137135 }
138136
139137 // If we are in no-workspace or single-folder workspace, adding folders has to
You can’t perform that action at this time.
0 commit comments