debt - adopt defaultUriScheme over hardcoded vscode-remote in toLocalResource

This commit is contained in:
Benjamin Pasero
2020-09-10 18:03:51 +02:00
parent b1b5b8a9a3
commit 6e022766d1
11 changed files with 32 additions and 19 deletions

View File

@@ -35,6 +35,7 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
import { IPathService } from 'vs/workbench/services/path/common/pathService';
import { IWorkingCopyFileService } from 'vs/workbench/services/workingCopy/common/workingCopyFileService';
import { IWorkingCopy, IWorkingCopyBackup, IWorkingCopyService, WorkingCopyCapabilities } from 'vs/workbench/services/workingCopy/common/workingCopyService';
@@ -314,6 +315,7 @@ class MainThreadCustomEditorModel extends Disposable implements ICustomEditorMod
@IUndoRedoService private readonly _undoService: IUndoRedoService,
@IWorkbenchEnvironmentService private readonly _environmentService: IWorkbenchEnvironmentService,
@IWorkingCopyService workingCopyService: IWorkingCopyService,
@IPathService private readonly _pathService: IPathService
) {
super();
@@ -535,7 +537,7 @@ class MainThreadCustomEditorModel extends Disposable implements ICustomEditorMod
}
const remoteAuthority = this._environmentService.configuration.remoteAuthority;
const localResource = toLocalResource(this._editorResource, remoteAuthority);
const localResource = toLocalResource(this._editorResource, remoteAuthority, this._pathService.defaultUriScheme);
return this._fileDialogService.pickFileToSave(localResource, options?.availableFileSystems);
}