From 9b00c330b8f1ee8a03973ac3977e92d3423d67f3 Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Fri, 23 Mar 2018 23:15:54 -0600 Subject: [PATCH] Use uri.toString() instead of fsPath to get untittled:untitled-1 path If you use fsPath you get a path of "Untitled-1" which doesn't work with PSES IsInMemory method. Fix #1155 where selecting PSSA rules in Untitled-1 file crashes PSES. --- src/features/SelectPSSARules.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/SelectPSSARules.ts b/src/features/SelectPSSARules.ts index 04bb2f7618..c1a17dc64e 100644 --- a/src/features/SelectPSSARules.ts +++ b/src/features/SelectPSSARules.ts @@ -47,7 +47,7 @@ export class SelectPSSARulesFeature implements IFeature { this.languageClient.sendRequest( SetPSSARulesRequestType, { - filepath: vscode.window.activeTextEditor.document.uri.fsPath, + filepath: vscode.window.activeTextEditor.document.uri.toString(), ruleInfos: updatedOptions.map((option: ICheckboxQuickPickItem): RuleInfo => { return { name: option.label, isEnabled: option.isSelected }; }),