Windows: Fix url to object when using a http remote.

annexLocations uses OS-native directory separators, but for an url,
it needs to use / even on Windows.

This is an ugly workaround. Could parameterize a lot of stuff in
annexLocations to fix it better. I suspect this is probably the only place
it's needed though.
This commit is contained in:
Joey Hess 2013-07-07 13:35:06 -04:00
parent 68630db661
commit 7e7b2daddf
4 changed files with 16 additions and 1 deletions

View file

@ -266,9 +266,14 @@ onLocal r a = do
a
keyUrls :: Git.Repo -> Key -> [String]
keyUrls r key = map tourl (annexLocations key)
keyUrls r key = map tourl locs
where
tourl l = Git.repoLocation r ++ "/" ++ l
#ifndef __WINDOWS__
locs = annexLocations key
#else
locs = replace "\\" "/" $ annexLocations key
#endif
dropKey :: Remote -> Key -> Annex Bool
dropKey r key