summaryrefslogtreecommitdiff
path: root/Remote/WebDAV.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-18 13:46:38 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-18 13:46:38 -0400
commita12d242cdd199dc2a65153a8ec9f772ce5a747e6 (patch)
treea9b43bae8a26542a732062fe2b7fcb9162e95171 /Remote/WebDAV.hs
parenta1fd0fb488ad28f4b31b60a2b5e129f98d83f18d (diff)
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.
Diffstat (limited to 'Remote/WebDAV.hs')
-rw-r--r--Remote/WebDAV.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs
index 14152559c..3b6b6abf6 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 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<propertyupdate/>"
getCreds :: RemoteConfig -> UUID -> Annex (Maybe CredPair)
getCreds c u = maybe missing (return . Just) =<< getRemoteCredPair c creds