From 8a6941a216ca64c8b6b85a10334f859e41559746 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Nov 2012 13:46:38 -0400 Subject: [PATCH] fix build with xml-conduit newer than in debian The Element data type changed to use a map of attributes. Rather than ifdef, I'm avoiding directly using that data type. --- Remote/WebDAV.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs index 14152559c4..3b6b6abf60 100644 --- a/Remote/WebDAV.hs +++ b/Remote/WebDAV.hs @@ -15,6 +15,7 @@ import qualified Data.ByteString.UTF8 as B8 import qualified Data.ByteString.Lazy.UTF8 as L8 import qualified Data.ByteString.Lazy as L import qualified Data.Text as T +import qualified Data.Text.Lazy as LT import qualified Text.XML as XML import Network.URI (normalizePathSegments) import qualified Control.Exception as E @@ -307,9 +308,7 @@ contentType = Just $ B8.fromString "application/octet-stream" {- The DAV library requires that properties be specified when storing a file. - This just omits any real properties. -} noProps :: XML.Document -noProps = XML.Document (XML.Prologue [] Nothing []) root [] - where - root = XML.Element (XML.Name (T.pack "propertyupdate") Nothing Nothing) [] [] +noProps = XML.parseText_ XML.def $ LT.pack "\n" getCreds :: RemoteConfig -> UUID -> Annex (Maybe CredPair) getCreds c u = maybe missing (return . Just) =<< getRemoteCredPair c creds