always poll file
This is now only used when downloading an url, and polling is always needed when using curl, no matter how the output is configured.
This commit is contained in:
parent
c8f2d302dc
commit
bd45129c27
1 changed files with 3 additions and 11 deletions
|
@ -83,19 +83,11 @@ metered othermeter key getsrcfile a = withMessageState $ \st ->
|
||||||
Nothing -> return Nothing
|
Nothing -> return Nothing
|
||||||
Just f -> catchMaybeIO $ liftIO $ getFileSize f
|
Just f -> catchMaybeIO $ liftIO $ getFileSize f
|
||||||
|
|
||||||
{- Poll file size to display meter, but only when concurrent output or
|
{- Poll file size to display meter. -}
|
||||||
- json progress needs the information. -}
|
|
||||||
meteredFile :: FilePath -> Maybe MeterUpdate -> Key -> Annex a -> Annex a
|
meteredFile :: FilePath -> Maybe MeterUpdate -> Key -> Annex a -> Annex a
|
||||||
meteredFile file combinemeterupdate key a =
|
meteredFile file combinemeterupdate key a =
|
||||||
withMessageState $ \s -> if needOutputMeter s
|
metered combinemeterupdate key (return Nothing) $ \_ p ->
|
||||||
then metered combinemeterupdate key (return Nothing) $ \_ p ->
|
watchFileSize file p a
|
||||||
watchFileSize file p a
|
|
||||||
else a
|
|
||||||
where
|
|
||||||
needOutputMeter s = case outputType s of
|
|
||||||
JSONOutput jsonoptions -> jsonProgress jsonoptions
|
|
||||||
NormalOutput | concurrentOutputEnabled s -> True
|
|
||||||
_ -> False
|
|
||||||
|
|
||||||
{- Progress dots. -}
|
{- Progress dots. -}
|
||||||
showProgressDots :: Annex ()
|
showProgressDots :: Annex ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue