Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed May 15, 2019
1 parent b7cc96f commit fcf7f67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/common/editor/textEditorModel.ts
Expand Up @@ -126,7 +126,7 @@ export abstract class BaseTextEditorModel extends EditorModel implements ITextEd

// lookup mode via resource path if the provided mode is unspecific
if (!preferredMode || preferredMode === PLAINTEXT_MODE_ID) {
return modeService.createByFilepathOrFirstLine(resource ? resource.fsPath : null, firstLineText);
return modeService.createByFilepathOrFirstLine(resource ? resource.path : null, firstLineText);
}

// otherwise take the preferred mode for granted
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/backup/common/backupRestorer.ts
Expand Up @@ -79,7 +79,7 @@ export class BackupRestorer implements IWorkbenchContribution {
// this is a (weak) strategy to find out if the untitled input had
// an associated file path or not by just looking at the path. and
// if so, we must ensure to restore the local resource it had.
if (resource.scheme === Schemas.untitled && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) {
if (resource.scheme === Schemas.untitled && !BackupRestorer.UNTITLED_REGEX.test(resource.path)) {
return { resource: toLocalResource(resource, this.environmentService.configuration.remoteAuthority), options, forceUntitled: true };
}

Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/files/common/files.ts
Expand Up @@ -204,7 +204,7 @@ export class TextFileContentProvider implements ITextModelContentProvider {
if (textFileModel) {
languageSelector = this.modeService.create(textFileModel.getModeId());
} else {
languageSelector = this.modeService.createByFilepathOrFirstLine(savedFileResource.fsPath);
languageSelector = this.modeService.createByFilepathOrFirstLine(savedFileResource.path);
}

codeEditorModel = this.modelService.createModel(content.value, languageSelector, resource);
Expand Down

0 comments on commit fcf7f67

Please sign in to comment.