From bd45129c27423582cd231268e545def0d2069658 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 6 Apr 2018 23:09:19 -0400 Subject: [PATCH] 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. --- Messages/Progress.hs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Messages/Progress.hs b/Messages/Progress.hs index bc7d1a0517..bd43dbfc4b 100644 --- a/Messages/Progress.hs +++ b/Messages/Progress.hs @@ -83,19 +83,11 @@ metered othermeter key getsrcfile a = withMessageState $ \st -> Nothing -> return Nothing Just f -> catchMaybeIO $ liftIO $ getFileSize f -{- Poll file size to display meter, but only when concurrent output or - - json progress needs the information. -} +{- Poll file size to display meter. -} meteredFile :: FilePath -> Maybe MeterUpdate -> Key -> Annex a -> Annex a meteredFile file combinemeterupdate key a = - withMessageState $ \s -> if needOutputMeter s - then metered combinemeterupdate key (return Nothing) $ \_ p -> - watchFileSize file p a - else a - where - needOutputMeter s = case outputType s of - JSONOutput jsonoptions -> jsonProgress jsonoptions - NormalOutput | concurrentOutputEnabled s -> True - _ -> False + metered combinemeterupdate key (return Nothing) $ \_ p -> + watchFileSize file p a {- Progress dots. -} showProgressDots :: Annex ()