* Fix build without the assistant.
* fsck: Avoid complaining about required content of dead repositories.
* drop: Avoid redundant object directory thawing.
+ * httpalso: Windows url fix.
-- Joey Hess <id@joeyh.name> Fri, 21 Mar 2025 12:27:11 -0400
{- HttpAlso remote (readonly).
-
- - Copyright 2020-2023 Joey Hess <id@joeyh.name>
+ - Copyright 2020-2025 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
import Annex.Verify
import qualified Annex.Url as Url
import Annex.SpecialRemote.Config
+import Git.FilePath
import Data.Either
import qualified Data.Map as M
]
]
where
- mkurl k hasher = baseurl P.</> fromOsPath (hasher k) P.</> kf k
+ mkurl k hasher = baseurl
+ -- On windows, the hasher uses `\` path separators,
+ -- but for an url, it needs to use '/'.
+ -- So, use toInternalGitPath.
+ P.</> fromOsPath (toInternalGitPath (hasher k))
+ P.</> kf k
kf k = fromOsPath (keyFile k)
Yes, our whole data management relies on git-annex and datalad! Thanks for that amazing tool!
[[!tag projects/datalad]]
+
+> [[fixed|done]] --[[Joey]]
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2025-03-26T15:36:35Z"
+ content="""
+> `xw%5CXV%5C` should be something like `xw/XV` so some conversion of
+> the windows backslash to posix might not be working
+
+That was a good analysis, thanks!
+
+I see that Remote.HttpAlso.supportedLayouts uses hashDirLower and
+hashDirMixed. Which are implemented using OS-native path separators.
+So, on Windows, that does come out with the slash the wrong way around.
+I don't think that the actual url-encoding of it is problimatic.
+
+I've put in a workaround. I have not tested on windows, so please re-open
+this bug report if you upgrade and find it still somehow doesn't work.
+"""]]