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
Resolver.file mangles UNC paths #5596
Closed
Comments
@batterseapower Thanks for the report. I blogged about related topic a while back (http://eed3si9n.com/encoding-file-path-as-URI-reference). I'll compare to see what's happening in this code. |
Wow, that's a very comprehensive post. I hadn't considered that using |
eed3si9n
added a commit
to eed3si9n/librarymanagement
that referenced
this issue
Jun 26, 2020
Here's my PR - sbt/librarymanagement#337 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If on Windows we do something like this:
Then the resulting
FileResolver
is built with paths like"C:\intra\live\foo\[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
i.e. the UNC path is replaced with the drive letter of the current working directory, which is definitely not what we want.The cause of the problem is https://github.com/sbt/librarymanagement/blob/c3dca6880d7b129f708c8b59cf703e52fb4554e3/core/src/main/scala/sbt/librarymanagement/ResolverExtra.scala#L307
i.e.
Because:
I think you can fix this by just dropping the use of
normalize
sincenew File(new File("//intra/live/foo").toURI()).getAbsolutePath()
=="//intra/live/foo"
The text was updated successfully, but these errors were encountered: