summaryrefslogtreecommitdiff
path: root/Remote/WebDAV.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-02 16:01:20 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-02 16:01:20 -0400
commitc056b953033c20f6816cea832215ee1c51a34744 (patch)
treed199de7a68f335a160a6fc90922f0eb6d927d230 /Remote/WebDAV.hs
parent1bc39540ad74ce601b0e33f1d64345a8630daa1e (diff)
Deal with box.com changing the url of their webdav endpoint.
Use new url when making new remotes. Transparently rewrite old url to new for existing remotes.
Diffstat (limited to 'Remote/WebDAV.hs')
-rw-r--r--Remote/WebDAV.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs
index 738dbde3f..acee624ae 100644
--- a/Remote/WebDAV.hs
+++ b/Remote/WebDAV.hs
@@ -220,7 +220,10 @@ davAction r unconfigured action = do
_ -> return unconfigured
configUrl :: Remote -> Maybe DavUrl
-configUrl r = M.lookup "url" $ config r
+configUrl r = fixup <$> M.lookup "url" (config r)
+ where
+ -- box.com DAV url changed
+ fixup = replace "https://www.box.com/dav/" "https://dav.box.com/dav/"
toDavUser :: String -> DavUser
toDavUser = B8.fromString