summaryrefslogtreecommitdiff
path: root/Command/ImportFeed.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-07-28 17:24:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-07-28 17:24:30 -0400
commitb2d38a44ecfe3ad4e4a9c24dac52bcb36e941926 (patch)
tree9d88b8c38e0d503a2de8ec06a27f133d4f2cfd11 /Command/ImportFeed.hs
parentbf8a534abbeaa6f327072c6cd19b325da3157291 (diff)
don't crash on encoding issues in feeds
filesystem encoding to the rescue once more! IIRC this was the main bug in hpodder.
Diffstat (limited to 'Command/ImportFeed.hs')
-rw-r--r--Command/ImportFeed.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index d919a9626..90b35c8de 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -85,6 +85,7 @@ downloadFeed :: URLString -> Annex (Maybe Feed)
downloadFeed url = do
showOutput
liftIO $ withTmpFile "feed" $ \f h -> do
+ fileEncoding h
ifM (Url.download url [] [] f)
( parseFeedString <$> hGetContentsStrict h
, return Nothing