Change to fspath from resource tostring (#15069)

This commit is contained in:
Chris LaFreniere
2021-04-09 12:00:55 -07:00
committed by GitHub
parent 8ea1d9fd8a
commit e5a500d1a5

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) {