From 543a78bae0438c2eafc157ffbec0be922bba88b3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Apr 2013 14:10:55 -0400 Subject: [PATCH] Support building with DAV 0.4. --- Remote/WebDAV.hs | 7 ++++++- debian/changelog | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs index 8af4791c02..52fc32b3a7 100644 --- a/Remote/WebDAV.hs +++ b/Remote/WebDAV.hs @@ -231,7 +231,7 @@ davUrl :: DavUrl -> FilePath -> DavUrl davUrl baseurl file = baseurl file 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 decode (Right _) = Right True #if ! MIN_VERSION_http_conduit(1,9,0) @@ -241,6 +241,11 @@ davUrlExists url user pass = decode <$> catchHttp (getProps url user pass) #endif | statusCode status == statusCode notFound404 = Right False 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 url user pass = fmap (snd . snd) <$> diff --git a/debian/changelog b/debian/changelog index 197057f1fd..8b23ffea7c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,6 +47,7 @@ git-annex (4.20130418) UNRELEASED; urgency=low when creating a new remote of the same type. Done for Internet Archive, S3, Glacier, and Box.com remotes. * Store an annex-uuid file in the bucket when setting up a new S3 remote. + * Support building with DAV 0.4. -- Joey Hess Thu, 18 Apr 2013 16:22:48 -0400