Fix doubled progress display when downloading an url when -J is used.
downloadUrl uses meteredFile, which sets up one progress meter,
and Remote.Web also uses metered, so two progress meters are displayed for
the same download.
Reversion introduced with the http-conduit switch in
c34152777b
-- I don't know why the extra
call to metered was added there.
When -J is not used, the extra progress meter didn't display,
but an extra blank line did get output, which is also fixed.
This commit was sponsored by John Pellman on Patreon.
This commit is contained in:
parent
260ac417dd
commit
a26514d67e
3 changed files with 4 additions and 3 deletions
|
@ -880,7 +880,8 @@ saveState nocommit = doSideAction $ do
|
|||
whenM (annexAlwaysCommit <$> Annex.getGitConfig) $
|
||||
Annex.Branch.commit =<< Annex.Branch.commitMessage
|
||||
|
||||
{- Downloads content from any of a list of urls. -}
|
||||
{- Downloads content from any of a list of urls, displaying a progress
|
||||
- meter. -}
|
||||
downloadUrl :: Key -> MeterUpdate -> [Url.URLString] -> FilePath -> Annex Bool
|
||||
downloadUrl k p urls file =
|
||||
-- Poll the file to handle configurations where an external
|
||||
|
|
|
@ -10,6 +10,7 @@ git-annex (7.20181212) UNRELEASED; urgency=medium
|
|||
adjusted unlocked. (Fixes test suite on crippled filesystems.)
|
||||
* unused: Update suggested git log message to see where data was previously
|
||||
used so it will also work with v7 unlocked pointer files.
|
||||
* Fix doubled progress display when downloading an url when -J is used.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Tue, 18 Dec 2018 12:24:52 -0400
|
||||
|
||||
|
|
|
@ -87,8 +87,7 @@ downloadKey key _af dest p = unVerified $ get =<< getWebUrls key
|
|||
YoutubeDownloader -> do
|
||||
showOutput
|
||||
youtubeDlTo key u' dest
|
||||
_ -> metered (Just p) key (pure Nothing) $ \_ p' ->
|
||||
downloadUrl key p' [u'] dest
|
||||
_ -> downloadUrl key p [u'] dest
|
||||
|
||||
downloadKeyCheap :: Key -> AssociatedFile -> FilePath -> Annex Bool
|
||||
downloadKeyCheap _ _ _ = return False
|
||||
|
|
Loading…
Add table
Reference in a new issue