mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-10 16:58:55 -05:00
part of #50760
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user