Skip to content

Commit e77bbc0

Browse files
author
Benjamin Pasero
committed
1 parent 43d1681 commit e77bbc0

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/vs/workbench/parts/preferences/common/preferencesContribution.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
2121
import { IEditorOpeningEvent } from 'vs/workbench/common/editor';
2222
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
2323
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
24+
import { isEqual } from 'vs/base/common/paths';
25+
import { isLinux } from 'vs/base/common/platform';
2426

2527
const schemaRegistry = Registry.as<JSONContributionRegistry.IJSONContributionRegistry>(JSONContributionRegistry.Extensions.JSONContribution);
2628

@@ -79,7 +81,7 @@ export class PreferencesContribution implements IWorkbenchContribution {
7981
}
8082

8183
// Global User Settings File
82-
if (resource.fsPath === this.environmentService.appSettingsPath) {
84+
if (isEqual(resource.fsPath, this.environmentService.appSettingsPath, !isLinux)) {
8385
return event.prevent(() => this.preferencesService.openGlobalSettings(event.options, event.position));
8486
}
8587

src/vs/workbench/services/textfile/common/textFileEditorModel.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { ITextBufferFactory } from 'vs/editor/common/model';
3232
import { IHashService } from 'vs/workbench/services/hash/common/hashService';
3333
import { createTextBufferFactory } from 'vs/editor/common/model/textModel';
3434
import { INotificationService } from 'vs/platform/notification/common/notification';
35+
import { isLinux } from 'vs/base/common/platform';
3536

3637
/**
3738
* 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
780781
private isSettingsFile(): boolean {
781782

782783
// Check for global settings file
783-
if (this.resource.fsPath === this.environmentService.appSettingsPath) {
784+
if (path.isEqual(this.resource.fsPath, this.environmentService.appSettingsPath, !isLinux)) {
784785
return true;
785786
}
786787

0 commit comments

Comments
 (0)