Skip to content

Commit 9b00c33

Browse files
committed
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.
1 parent f1866cc commit 9b00c33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/features/SelectPSSARules.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class SelectPSSARulesFeature implements IFeature {
4747
this.languageClient.sendRequest(
4848
SetPSSARulesRequestType,
4949
{
50-
filepath: vscode.window.activeTextEditor.document.uri.fsPath,
50+
filepath: vscode.window.activeTextEditor.document.uri.toString(),
5151
ruleInfos: updatedOptions.map((option: ICheckboxQuickPickItem): RuleInfo => {
5252
return { name: option.label, isEnabled: option.isSelected };
5353
}),

0 commit comments

Comments
 (0)