importfeed: Fix feed download when curl is used.

This bug used to only afflict file:/// urls, but became more exposed
by b8f0b7309f.
This commit is contained in:
Joey Hess 2015-04-09 13:02:57 -04:00
parent c65e71e6a5
commit aa31af5594
2 changed files with 3 additions and 2 deletions

View file

@ -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
)