diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index ff5a189ebb7..d75347f83dc 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -128,7 +128,6 @@ class ExtensionStoragePath { if (!this._workspace) { return TPromise.as(undefined); } - // TODO@joh what to do with multiple roots? const storageName = this._workspace.id; const storagePath = join(this._environment.appSettingsHome, 'workspaceStorage', storageName); diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 5478bcbe539..c1617034e62 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -367,11 +367,11 @@ class FolderConfiguration extends Disposable { return false; // only JSON files } - return this.isWorkspaceConfigurationFile(this.toWorkspaceRelativePath(stat.resource)); // only workspace config files + return this.isWorkspaceConfigurationFile(this.toFolderRelativePath(stat.resource)); // only workspace config files }).map(stat => stat.resource)); }, err => [] /* never fail this call */) .then((contents: IContent[]) => { - contents.forEach(content => this.workspaceFilePathToConfiguration[this.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); + contents.forEach(content => this.workspaceFilePathToConfiguration[this.toFolderRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); }, errors.onUnexpectedError); } @@ -397,7 +397,7 @@ class FolderConfiguration extends Disposable { continue; // only JSON files or the actual settings folder } - const workspacePath = this.toWorkspaceRelativePath(resource); + const workspacePath = this.toFolderRelativePath(resource); if (!workspacePath) { continue; // event is not inside workspace } @@ -443,7 +443,7 @@ class FolderConfiguration extends Disposable { } private createConfigModel(content: IContent): ConfigurationModel { - const path = this.toWorkspaceRelativePath(content.resource); + const path = this.toFolderRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { return new FolderSettingsModel(content.value, content.resource.toString()); } else { @@ -456,19 +456,19 @@ class FolderConfiguration extends Disposable { return new CustomConfigurationModel(null); } - private isWorkspaceConfigurationFile(workspaceRelativePath: string): boolean { - return [WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS.launch, WORKSPACE_STANDALONE_CONFIGURATIONS.tasks].some(p => p === workspaceRelativePath); + private isWorkspaceConfigurationFile(folderRelativePath: string): boolean { + return [WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS.launch, WORKSPACE_STANDALONE_CONFIGURATIONS.tasks].some(p => p === folderRelativePath); } - private toResource(workspaceRelativePath: string): URI { - if (typeof workspaceRelativePath === 'string') { - return URI.file(paths.join(this.folder.fsPath, workspaceRelativePath)); + private toResource(folderRelativePath: string): URI { + if (typeof folderRelativePath === 'string') { + return URI.file(paths.join(this.folder.fsPath, folderRelativePath)); } return null; } - private toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + private toFolderRelativePath(resource: URI, toOSPath?: boolean): string { if (this.contains(resource)) { return paths.normalize(paths.relative(this.folder.fsPath, resource.fsPath), toOSPath); }