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

Fix file uri under Windows are incorrect #433

Merged
merged 2 commits into from
Jun 17, 2022
Merged

Fix file uri under Windows are incorrect #433

merged 2 commits into from
Jun 17, 2022

Conversation

jfcherng
Copy link
Contributor

@jfcherng jfcherng commented Jun 17, 2022

Fixes #259


https://en.wikipedia.org/wiki/File_URI_scheme#Windows_2

You can't just prefix it with "file://".
Under Windows, that means it's a network location.

Let's just uses Node's API to do a proper conversion.

https://nodejs.org/api/url.html#urlpathtofileurlpath

Signed-off-by: Jack Cherng [email protected]

https://en.wikipedia.org/wiki/File_URI_scheme#Windows_2

You can't just prefix it with "file://".
Under Windows, that means it's a network location.

Let's just uses Node's API to do a proper conversion.

https://nodejs.org/api/url.html#urlpathtofileurlpath

Signed-off-by: Jack Cherng <[email protected]>
@codecov
Copy link

codecov bot commented Jun 17, 2022

Codecov Report

Merging #433 (8c027c8) into main (0299652) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head 8c027c8 differs from pull request most recent head b5acb46. Consider uploading reports for the commit b5acb46 to get more accurate results

@@            Coverage Diff             @@
##             main     #433      +/-   ##
==========================================
+ Coverage   74.39%   74.43%   +0.03%     
==========================================
  Files          19       19              
  Lines         660      661       +1     
  Branches      116      116              
==========================================
+ Hits          491      492       +1     
  Misses        153      153              
  Partials       16       16              
Impacted Files Coverage Δ
server/src/analyser.ts 83.72% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51e4964...b5acb46. Read the comment docs.

@skovhus skovhus enabled auto-merge June 17, 2022 17:10
@skovhus
Copy link
Collaborator

skovhus commented Jun 17, 2022

Thanks for fixing this!

@skovhus skovhus merged commit 48a1466 into bash-lsp:main Jun 17, 2022
@jfcherng jfcherng deleted the fix/windows-file-uri branch June 17, 2022 17:21
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.

Unable to Read - Error when jumping to file from reference list
2 participants