From 19defc793292073ff35644b1a84d77703986448b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Aug 2019 14:32:06 -0400 Subject: [PATCH] fix reversion 4af55c42bfb3e8adcd103a8deb82310753a3b047 reordered the exception catching, preventing following ftp redirect --- Utility/Url.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utility/Url.hs b/Utility/Url.hs index a038bb68a7..4ab79e5a76 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -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