Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2023-01-28 14:26:14 -04:00
commit afc8608ef2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,20 @@
[[!comment format=mdwn
username="mih"
avatar="http://cdn.libravatar.org/avatar/f881df265a423e4f24eff27c623148fd"
subject="file:/// must be forced to file:// on windows"
date="2023-01-27T09:19:10Z"
content="""
I just want to leave a note that the `file:` URL scheme handling on windows is still problematic. A file URL (e.g. generated by Python's `pathlib.as_uri()`) like the following does not work:
```
file:///C:/DLTMP/myarchive.zip
```
it is parsed to the path `/C:/DLTMP/myarchive.zip` (as reported by OP), which is invalid.
A workaround is to replace `file:///` with `file://` (remove one slash). This makes git-annex accept the URL and parse it to the correct path `C:/DLTMP/myarchive.zip`.
However, such a \"double-slash\" URL is invalid. [Wikipedia](https://en.wikipedia.org/wiki/File_URI_scheme) has a dedicated bit on \"How many slashes?\" which states
> file://path (i.e. two slashes, without a hostname) is never correct, but is often used
"""]]

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="jpds"
avatar="http://cdn.libravatar.org/avatar/24d746ec6a7726b162c12ecceb3ee267"
subject="comment 7"
date="2023-01-28T00:00:13Z"
content="""
There's also https://github.com/str4d/rage if anyone prefers Rust implementations of things.
"""]]