Change to fspath from resource tostring (#15069) (#15078)

This commit is contained in:
Chris LaFreniere
2021-04-09 14:21:29 -07:00
committed by GitHub
parent bdd99bd0d8
commit e1aae951a3

View File

@@ -60,7 +60,7 @@ export class EditorReplacementContribution implements IWorkbenchContribution {
if (!language) {
// Attempt to use extension or extension of modified input (if in diff editor)
// remove the .
language = editor instanceof DiffEditorInput ? path.extname(editor.modifiedInput.resource.toString()).slice(1) : path.extname(editor.resource.toString()).slice(1);
language = editor instanceof DiffEditorInput ? path.extname(editor.modifiedInput.resource.fsPath).slice(1) : path.extname(editor.resource.toString()).slice(1);
}
if (!language) {