This commit is contained in:
Benjamin Pasero
2018-05-30 09:09:31 +02:00
parent 43d168182c
commit e77bbc0af7
2 changed files with 5 additions and 2 deletions

View File

@@ -21,6 +21,8 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
import { IEditorOpeningEvent } from 'vs/workbench/common/editor';
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { isEqual } from 'vs/base/common/paths';
import { isLinux } from 'vs/base/common/platform';
const schemaRegistry = Registry.as<JSONContributionRegistry.IJSONContributionRegistry>(JSONContributionRegistry.Extensions.JSONContribution);
@@ -79,7 +81,7 @@ export class PreferencesContribution implements IWorkbenchContribution {
}
// Global User Settings File
if (resource.fsPath === this.environmentService.appSettingsPath) {
if (isEqual(resource.fsPath, this.environmentService.appSettingsPath, !isLinux)) {
return event.prevent(() => this.preferencesService.openGlobalSettings(event.options, event.position));
}

View File

@@ -32,6 +32,7 @@ import { ITextBufferFactory } from 'vs/editor/common/model';
import { IHashService } from 'vs/workbench/services/hash/common/hashService';
import { createTextBufferFactory } from 'vs/editor/common/model/textModel';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { isLinux } from 'vs/base/common/platform';
/**
* The text file editor model listens to changes to its underlying code editor model and saves these changes through the file service back to the disk.
@@ -780,7 +781,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
private isSettingsFile(): boolean {
// Check for global settings file
if (this.resource.fsPath === this.environmentService.appSettingsPath) {
if (path.isEqual(this.resource.fsPath, this.environmentService.appSettingsPath, !isLinux)) {
return true;
}