Avoid running annex.http-headers-command more than once.
This commit is contained in:
parent
98cc34c211
commit
2ec07bc29f
11 changed files with 31 additions and 28 deletions
|
@ -150,13 +150,13 @@ downloadFeed url
|
|||
| Url.parseURIRelaxed url == Nothing = giveup "invalid feed url"
|
||||
| otherwise = do
|
||||
showOutput
|
||||
uo <- Url.getUrlOptions
|
||||
liftIO $ withTmpFile "feed" $ \f h -> do
|
||||
hClose h
|
||||
ifM (Url.download url f uo)
|
||||
( parseFeedString <$> readFileStrict f
|
||||
, return Nothing
|
||||
)
|
||||
Url.withUrlOptions $ \ou ->
|
||||
liftIO $ withTmpFile "feed" $ \f h -> do
|
||||
hClose h
|
||||
ifM (Url.download url f uo)
|
||||
( parseFeedString <$> readFileStrict f
|
||||
, return Nothing
|
||||
)
|
||||
|
||||
performDownload :: ImportFeedOptions -> Cache -> ToDownload -> Annex Bool
|
||||
performDownload opts cache todownload = case location todownload of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue