Support building with DAV 0.4.

This commit is contained in:
Joey Hess 2013-04-30 14:10:55 -04:00
parent df88c51334
commit 543a78bae0
2 changed files with 7 additions and 1 deletions

View file

@ -231,7 +231,7 @@ davUrl :: DavUrl -> FilePath -> DavUrl
davUrl baseurl file = baseurl </> file davUrl baseurl file = baseurl </> file
davUrlExists :: DavUrl -> DavUser -> DavPass -> IO (Either String Bool) davUrlExists :: DavUrl -> DavUser -> DavPass -> IO (Either String Bool)
davUrlExists url user pass = decode <$> catchHttp (getProps url user pass) davUrlExists url user pass = decode <$> catchHttp get
where where
decode (Right _) = Right True decode (Right _) = Right True
#if ! MIN_VERSION_http_conduit(1,9,0) #if ! MIN_VERSION_http_conduit(1,9,0)
@ -241,6 +241,11 @@ davUrlExists url user pass = decode <$> catchHttp (getProps url user pass)
#endif #endif
| statusCode status == statusCode notFound404 = Right False | statusCode status == statusCode notFound404 = Right False
decode (Left e) = Left $ showEitherException e decode (Left e) = Left $ showEitherException e
#if ! MIN_VERSION_DAV(0,4,0)
get = getProps url user pass
#else
get = getProps url user pass Nothing
#endif
davGetUrlContent :: DavUrl -> DavUser -> DavPass -> IO (Maybe L.ByteString) davGetUrlContent :: DavUrl -> DavUser -> DavPass -> IO (Maybe L.ByteString)
davGetUrlContent url user pass = fmap (snd . snd) <$> davGetUrlContent url user pass = fmap (snd . snd) <$>

1
debian/changelog vendored
View file

@ -47,6 +47,7 @@ git-annex (4.20130418) UNRELEASED; urgency=low
when creating a new remote of the same type. Done for Internet Archive, when creating a new remote of the same type. Done for Internet Archive,
S3, Glacier, and Box.com remotes. S3, Glacier, and Box.com remotes.
* Store an annex-uuid file in the bucket when setting up a new S3 remote. * Store an annex-uuid file in the bucket when setting up a new S3 remote.
* Support building with DAV 0.4.
-- Joey Hess <joeyh@debian.org> Thu, 18 Apr 2013 16:22:48 -0400 -- Joey Hess <joeyh@debian.org> Thu, 18 Apr 2013 16:22:48 -0400