summaryrefslogtreecommitdiff
path: root/Remote/WebDAV.hs
diff options
context:
space:
mode:
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 35af290ad..87df16e93 100644
--- a/Remote/WebDAV.hs
+++ b/Remote/WebDAV.hs
@@ -260,7 +260,10 @@ existsDAV :: DavLocation -> DAVT IO (Either String Bool)
existsDAV l = inLocation l check `catchNonAsync` (\e -> return (Left $ show e))
where
check = do
- setDepth Nothing
+ -- Some DAV services only support depth of 1, and
+ -- more depth is certainly not needed to check if a
+ -- location exists.
+ setDepth (Just Depth1)
catchJust
(matchStatusCodeException (== notFound404))
(getPropsM >> ispresent True)