resources#relativePath does not honour path casing strategy
See original GitHub issueIt seems to me that resources.relativePath
ignores the fact that path casing should be ignored depending on the underlying file system. As you can see here:
Extracted from https://github.com/microsoft/vscode/issues/107774
I am actually no longer so sure that path casing is ignored, @jrieken is that handling for file URI intentional?
Only @aeschli knows, he wrote those utils and I didn’t change their semantics when moving them to IExtUri
. But, yeah it seems that there is some scheme and platform specific handling in there and I don’t think that is good.
_Originally posted by @jrieken in https://github.com/microsoft/vscode/issues/107774#issuecomment-705017638_
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (12 by maintainers)
Top Results From Across the Web
open resource with relative path in Java - Stack Overflow
I was having issues loading my resources from the res directory. I wanted all my resources separate from my source code (simply for...
Read more >Uploaded file resource: Relative links - Moodle.org
Everything was working fine but now I have a problem: The relative links within the uploaded html files (image links) are not properly...
Read more >Beginners guide to serving files using HTTP servers in Go
Any relative file paths used in these files hold no meaning in runtime. os.Executable function. In most cases, we should try to use...
Read more >Relative Paths to Project Resources | ReadyAPI Documentation
To solve this issue, use the Resource Root project property. If this property is specified, ReadyAPI uses relative paths starting from the specified...
Read more >JAXB Users Guide - Java EE
Yet in some other cases, a schema may reference another schema in relative path, and that may not match your directory structure.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, we need to ensure the canonical URI is used unless people are using
IURIIdentityService.extUri
which is really what I was suggesting and actually prefer. Why would people bother with canonical URIs if you can just useIURIIDentityService.extUri
. I really think no one should be producing canonical URIs, only in very specific places as we do today where we create text models or editors.Anyone else should use
IURIIdentityService.extUri
when dealing with URIs and then this should not be an issue at all.@bpasero See https://github.com/microsoft/vscode/issues/108256#issuecomment-709436838: since a while
resources.relativePath
maps toextUri.relativePath
which is case sensitive for all schemas/platforms. We never ran into any issues as forfile
schems we didn’t honor the path casing strategy (the topic of this issue), Now with my proposed fix (#108796), this is uncovered.We must go through all usages of
resources.relativePath
and either a. change it toextUriBiasedIgnorePathCase.relativePath
to get the old behavior b. Make sure that the URIs that are passed in are canonical urisAlso a possibility: c. we change
resources.relativePath
toextUriBiasedIgnorePathCase.relativePath
. d. we alway ignore case for drive letters only (we already have code in relativePath to detect windows drive segments)(b.) is the preferred solution, but requires some work, e.g. #108793