diff options
author | Joey Hess <joey@kitenet.net> | 2013-07-07 13:35:06 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-07-07 13:35:56 -0400 |
commit | c5c157803bf0119b697a662f278134c2bada3079 (patch) | |
tree | 06c969a2f112a511d7b6a8774fe8a8833be75a2e /Remote/Git.hs | |
parent | cd5e8755042eca6254111375e9040f45cb848279 (diff) |
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.
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r-- | Remote/Git.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 3a277a82a..1e106f2e5 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -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 |