diff --git a/src/vs/workbench/services/files/electron-browser/remoteFileService.ts b/src/vs/workbench/services/files/electron-browser/remoteFileService.ts index 0722e8dfc97ab48dae1206b15dc0df67a94d95a7..1b13bcc87171cfff4b3afe72c39b73f223afd159 100644 --- a/src/vs/workbench/services/files/electron-browser/remoteFileService.ts +++ b/src/vs/workbench/services/files/electron-browser/remoteFileService.ts @@ -6,7 +6,7 @@ import { flatten, isFalsyOrEmpty } from 'vs/base/common/arrays'; import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; -import { TernarySearchTree, keys } from 'vs/base/common/map'; +import { TernarySearchTree } from 'vs/base/common/map'; import { Schemas } from 'vs/base/common/network'; import * as resources from 'vs/base/common/resources'; import URI from 'vs/base/common/uri'; @@ -161,12 +161,11 @@ class WorkspaceWatchLogic extends Disposable { export class RemoteFileService extends FileService { private readonly _provider: Map; - private readonly _lastKnownSchemes: string[]; constructor( @IExtensionService private readonly _extensionService: IExtensionService, - @IStorageService private readonly _storageService: IStorageService, - @IEnvironmentService private readonly _environmentService: IEnvironmentService, + @IStorageService storageService: IStorageService, + @IEnvironmentService environmentService: IEnvironmentService, @IConfigurationService configurationService: IConfigurationService, @IWorkspaceContextService contextService: IWorkspaceContextService, @ILifecycleService lifecycleService: ILifecycleService, @@ -175,16 +174,15 @@ export class RemoteFileService extends FileService { ) { super( contextService, - _environmentService, + environmentService, textResourceConfigurationService, configurationService, lifecycleService, - _storageService, + storageService, notificationService ); this._provider = new Map(); - this._lastKnownSchemes = JSON.parse(this._storageService.get('remote_schemes', undefined, '[]')); this._register(new WorkspaceWatchLogic(this, configurationService, contextService)); } @@ -195,7 +193,6 @@ export class RemoteFileService extends FileService { this._provider.set(scheme, provider); this._onDidChangeFileSystemProviderRegistrations.fire({ added: true, scheme, provider }); - this._storageService.store('remote_schemes', JSON.stringify(keys(this._provider))); const reg = provider.onDidChangeFile(changes => { // forward change events @@ -211,19 +208,7 @@ export class RemoteFileService extends FileService { } canHandleResource(resource: URI): boolean { - if (resource.scheme === Schemas.file || this._provider.has(resource.scheme)) { - return true; - } - // TODO@remote - // this needs to go, but this already went viral - // https://github.com/Microsoft/vscode/issues/48275 - if (this._lastKnownSchemes.indexOf(resource.scheme) < 0) { - return false; - } - if (!this._environmentService.isBuilt) { - console.warn('[remote] cache information required for ' + resource.toString()); - } - return true; + return resource.scheme === Schemas.file || this._provider.has(resource.scheme); } private _tryParseFileOperationResult(err: any): FileOperationResult {