fix reversion

4af55c42bf reordered the exception
catching, preventing following ftp redirect
This commit is contained in:
Joey Hess 2019-08-04 14:32:06 -04:00
parent f5eb28682a
commit 19defc7932
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -336,9 +336,9 @@ download' noerror meterupdate url file uo =
case (urlDownloader uo, parseUrlRequest (show u)) of
(DownloadWithConduit (DownloadWithCurlRestricted r), Just req) -> catchJust
(matchStatusCodeException (== found302))
((downloadConduit meterupdate req file uo >> return True)
`catchNonAsync` (dlfailed . show))
(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