show a message if asked to get something from the web that is not there

This commit is contained in:
Joey Hess 2011-08-27 07:08:15 -04:00
parent ec9291e9ea
commit f82da1d9dc

View file

@ -86,8 +86,12 @@ setUrl key url status = do
logChange g key webUUID (if null us then InfoMissing else InfoPresent) logChange g key webUUID (if null us then InfoMissing else InfoPresent)
downloadKey :: Key -> FilePath -> Annex Bool downloadKey :: Key -> FilePath -> Annex Bool
downloadKey key file = iter =<< getUrls key downloadKey key file = get =<< getUrls key
where where
get [] = do
warning "no known url"
return False
get a = iter a
iter [] = return False iter [] = return False
iter (url:urls) = do iter (url:urls) = do
ok <- Url.download url file ok <- Url.download url file