Skip to content

Conversation

TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt commented Aug 10, 2020

Fixes PowerShell/vscode-powershell#2810

So item.Path always contains forward slashes... this means that the paths returned on Windows will be mixed:

C:\Foo/Bar/baz.ps1

This result is used in counting references in CodeLens and C:\\Foo/Bar/baz.ps1 was being treated differently from C:\\Foo\\Bar\\baz.ps1 because they're just strings... https://github.com/PowerShell/PowerShellEditorServices/blob/master/src/PowerShellEditorServices/Services/Symbols/SymbolsService.cs#L200

this fixes the issue by fixing the directory separator...

... though in the future, it might be worth using FileInfo or something else in that ordered dictionary...

@TylerLeonhardt TylerLeonhardt merged commit 5463483 into PowerShell:master Aug 11, 2020
@TylerLeonhardt TylerLeonhardt deleted the fix-references-on-windows-due-to-slashes branch August 11, 2020 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

References are counted multiple times for similar named functions
2 participants