display error when an invalid url is downloaded
download is documented as displaying an error when download fails, but it didn't when the url was not valid at all. That leads to confusing behavior. Also, display the url with --debug
This commit is contained in:
parent
92cef3051b
commit
26a02cb386
3 changed files with 25 additions and 1 deletions
|
@ -311,7 +311,10 @@ download meterupdate url file uo =
|
|||
(DownloadWithCurl _, _)
|
||||
| isfileurl u -> downloadfile u
|
||||
| otherwise -> downloadcurl
|
||||
Nothing -> return False
|
||||
Nothing -> do
|
||||
liftIO $ debugM "url" url
|
||||
hPutStrLn stderr "download failed: invalid url"
|
||||
return False
|
||||
|
||||
isfileurl u = uriScheme u == "file:"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue