Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use LocalPath instead of OriginalString #1161

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt commented Jan 16, 2020

fixes PowerShell/vscode-powershell#2421

The WorkspacePath should be a path not a uri. This changes that back so that things like Directory.Exists(...) works and the likes.

I made sure this still works with non-ascii characters and unix & Windows path styles:

❯❯❯ [Uri]::new("file:///C:/a/%E6%B5%8B.ps1").LocalPath
C:\a\测.ps1

❯❯❯ [Uri]::new("file:///C:/a/%E6%B5%8B.ps1").LocalPath
C:\a\测.ps1

❯❯❯ [Uri]::new("file:///C:/a/blah.ps1").LocalPath
C:\a\blah.ps1

❯❯❯ [Uri]::new("file:///Users/a/blah.ps1").LocalPath
/Users/a/blah.ps1

❯❯❯ [Uri]::new("file:///Users/a/%E6%B5%8B.ps1").LocalPath
/Users/a/测.ps1

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.

CodeLens References not working if function is in another file
2 participants