summaryrefslogtreecommitdiff
path: root/Remote/WebDAV.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-07-12 16:30:36 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-07-12 16:41:45 -0400
commit709a62db222334a7de85261f78271e2f55de9cce (patch)
treee71c5b751437901e71cdb10b8faa4194317d01b8 /Remote/WebDAV.hs
parentdac4d4b9803cba2cf52746382f956c4107d1454c (diff)
Support checking presence of content at a http url that redirects to a ftp url.
Diffstat (limited to 'Remote/WebDAV.hs')
-rw-r--r--Remote/WebDAV.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs
index dd0ff5768..3de8b357e 100644
--- a/Remote/WebDAV.hs
+++ b/Remote/WebDAV.hs
@@ -30,7 +30,7 @@ import Remote.Helper.Http
import qualified Remote.Helper.Chunked.Legacy as Legacy
import Creds
import Utility.Metered
-import Utility.Url (URLString)
+import Utility.Url (URLString, matchStatusCodeException)
import Annex.UUID
import Remote.WebDAV.DavLocation
@@ -270,12 +270,6 @@ existsDAV l = inLocation l check `catchNonAsync` (\e -> return (Left $ show e))
(const $ ispresent False)
ispresent = return . Right
-matchStatusCodeException :: (Status -> Bool) -> HttpException -> Maybe HttpException
-matchStatusCodeException want e@(StatusCodeException s _ _)
- | want s = Just e
- | otherwise = Nothing
-matchStatusCodeException _ _ = Nothing
-
-- Ignores any exceptions when performing a DAV action.
safely :: DAVT IO a -> DAVT IO (Maybe a)
safely = eitherToMaybe <$$> tryNonAsync