diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-11-07 16:15:44 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-11-07 16:15:44 -0400 |
commit | f3af50df049cf3d75e3d0983979bfcedd8192ef1 (patch) | |
tree | bf940c1507f0c4d2b7d7d175d80f4ec298c3b5d5 /Remote/Web.hs | |
parent | bc92cb5a599865efc79f38044c56cbf67143c2c7 (diff) |
Web.checkKey: Fix handling of multiple urls
When there are multiple urls for a file, still treat it as being present
in the web when some urls don't work, as long as at least one url does
work.
This is consistent with the other web methods handling of multiple urls.
This commit was sponsored by Ole-Morten Duesund on Patreon.
Diffstat (limited to 'Remote/Web.hs')
-rw-r--r-- | Remote/Web.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/Web.hs b/Remote/Web.hs index f3580ca99..233c17eb3 100644 --- a/Remote/Web.hs +++ b/Remote/Web.hs @@ -119,8 +119,8 @@ checkKey' key us = firsthit us (Right False) $ \u -> do firsthit (u:rest) _ a = do r <- a u case r of - Right _ -> return r - Left _ -> firsthit rest r a + Right True -> return r + _ -> firsthit rest r a getWebUrls :: Key -> Annex [URLString] getWebUrls key = filter supported <$> getUrls key |