factor out untilTrue
This commit is contained in:
parent
fb68a7881f
commit
e19dc85547
4 changed files with 29 additions and 38 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue