git-annex/RemoteDaemon
Joey Hess cd076cd085
Windows: Support urls like "file:///c:/path"
That is a legal url, but parseUrl parses it to "/c:/path"
which is not a valid path on Windows. So as a workaround, use
parseURIPortable everywhere, which removes the leading slash when
run on windows.

Note that if an url is parsed like this and then serialized back
to a string, it will be different from the input. Which could
potentially be a problem, but is probably not in practice.

An alternative way to do it would be to have an uriPathPortable
that fixes up the path after parsing. But it would be harder to
make sure that is used everywhere, since uriPath is also used
when constructing an URI.

It's also worth noting that System.FilePath.normalize "/c:/path"
yields "c:/path". The reason I didn't use it is that it also
may change "/" to "\" in the path and I wanted to keep the url
changes minimal. Also noticed that convertToWindowsNativeNamespace
handles "/c:/path" the same as "c:/path".

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-03-27 13:38:02 -04:00
..
Transport remove support code for ancient git-annex-shell version 2021-10-11 16:07:08 -04:00
Common.hs Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Core.hs start splitting out readonly values from AnnexState 2021-04-02 15:51:44 -04:00
Transport.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Types.hs Windows: Support urls like "file:///c:/path" 2023-03-27 13:38:02 -04:00