From 7166fa150bbe98079e707ee9916434bd7e0affcc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 9 Apr 2015 13:02:57 -0400 Subject: importfeed: Fix feed download when curl is used. This bug used to only afflict file:/// urls, but became more exposed by b1483ee577dded9e00f8d82d52a806ee02888b2c. --- Command/ImportFeed.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Command') diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index b60627cfe..ed3c3bcd3 100644 --- a/Command/ImportFeed.hs +++ b/Command/ImportFeed.hs @@ -150,9 +150,9 @@ downloadFeed url = do showOutput uo <- Url.getUrlOptions liftIO $ withTmpFile "feed" $ \f h -> do - fileEncoding h + hClose h ifM (Url.download url f uo) - ( parseFeedString <$> hGetContentsStrict h + ( parseFeedString <$> readFileStrictAnyEncoding f , return Nothing ) -- cgit v1.2.3