fix display of http exceptions

This commit is contained in:
Joey Hess 2019-08-10 11:09:25 -04:00
parent 5bd515960c
commit 05d52f9699
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -338,11 +338,9 @@ download' noerror meterupdate url file uo =
(matchStatusCodeException (== found302))
(downloadConduit meterupdate req file uo >> return True)
(followredir r)
`catchNonAsync` (dlfailed . show)
(DownloadWithConduit (DownloadWithCurlRestricted r), Nothing)
| isfileurl u -> downloadfile u
| isftpurl u -> downloadcurlrestricted r u url ftpport
`catchNonAsync` (dlfailed . show)
| otherwise -> unsupportedUrlScheme u dlfailed
(DownloadWithCurl _, _)
| isfileurl u -> downloadfile u