RFR: Get resource path from URI to avoid getting spurious leading path separator on Windows
JornVernee via github.com
duke at openjdk.java.net
Mon Aug 5 11:00:08 UTC 2019
On Fri, 2 Aug 2019 15:03:49 GMT, JornVernee via github.com <duke at openjdk.java.net> wrote:
> One more little pathing problem I ran into when running GitWebrev through a debugger.
>
> The old code uses `URL::getPath`, but this results in a leading slash before the path, and on Windows absolute paths contain drive letters, so you get something like `/C:/a/b/c`, which is not a valid path syntax.
>
> We can first convert the URL to a URI, for which `Path::of` has a special overload that does the right thing for us.
>
> ----------------
>
> Commits:
> - a58471b3: Get path from URI to avoid getting spurious leading path separator on Windows
>
> Pull request:
> http://git.openjdk.java.net/skara/pull/36
>
> Webrev:
> https://openjdk.github.io/cr/skara/36/webrev.00
>
> Patch:
> http://git.openjdk.java.net/skara/pull/36.diff
>
> Fetch command:
> git fetch https://github.com/openjdk/skara.git pull/36/head:pull/36
Guess it doesn't recognize me as a committer yet :)
PR: http://git.openjdk.java.net/skara/pull/36
More information about the skara-dev
mailing list