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 showOutput
uo <- Url.getUrlOptions uo <- Url.getUrlOptions
liftIO $ withTmpFile "feed" $ \f h -> do liftIO $ withTmpFile "feed" $ \f h -> do
fileEncoding h hClose h
ifM (Url.download url f uo) ifM (Url.download url f uo)
( parseFeedString <$> hGetContentsStrict h ( parseFeedString <$> readFileStrictAnyEncoding f
, return Nothing , return Nothing
) )

1
debian/changelog vendored
View file

@ -12,6 +12,7 @@ git-annex (5.20150406.2) UNRELEASED; urgency=medium
commit. commit.
* info: Display repository mode: bare when in a bare (non-direct mode) * info: Display repository mode: bare when in a bare (non-direct mode)
repo. repo.
* importfeed: Fix feed download when curl is used.
-- Joey Hess <id@joeyh.name> Mon, 06 Apr 2015 20:14:20 -0400 -- Joey Hess <id@joeyh.name> Mon, 06 Apr 2015 20:14:20 -0400