summaryrefslogtreecommitdiff
path: root/Remote/Web.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-02 16:10:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-02 16:12:31 -0400
commite19dc8554723a148e6b809da4989a747f3aa925e (patch)
treee55363162c701f5250beae46323aa8e0a1a65ccb /Remote/Web.hs
parentfb68a7881f725a7b097f8b0f1b347f24dfea5d59 (diff)
factor out untilTrue
Diffstat (limited to 'Remote/Web.hs')
-rw-r--r--Remote/Web.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Remote/Web.hs b/Remote/Web.hs
index 64fcd51aa..5871ae8da 100644
--- a/Remote/Web.hs
+++ b/Remote/Web.hs
@@ -71,8 +71,6 @@ checkKey key = do
then return $ Right False
else return . Right =<< checkKey' us
checkKey' :: [URLString] -> Annex Bool
-checkKey' [] = return False
-checkKey' (u:us) = do
+checkKey' us = untilTrue us $ \u -> do
showAction $ "checking " ++ u
- e <- liftIO $ Url.exists u
- if e then return e else checkKey' us
+ liftIO $ Url.exists u