From 6203b8afba951e51091f35a9ffdf2946e5167a01 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 Nov 2023 17:37:55 -0400 Subject: [PATCH] the last line is for the current time --- Command/Log.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Command/Log.hs b/Command/Log.hs index 7124019e31..21c2b4cdce 100644 --- a/Command/Log.hs +++ b/Command/Log.hs @@ -380,7 +380,7 @@ sizeHistoryInfo mu o = do epoch = toEnum 0 displaysizes (zone, displayedyet, prevt, prevoutput) uuidmap sizemap t - | t - prevt > dt + | t - prevt >= dt && (displayedyet || any (/= 0) sizes) && (prevoutput /= Just output) = do displayts zone t output @@ -400,8 +400,9 @@ sizeHistoryInfo mu o = do then rawTimeStamp t else showTimeStamp zone "%Y-%m-%dT%H:%M:%S" t - displayendsizes (zone , _, t, Just output) = - displayts zone t output + displayendsizes (zone , _, _, Just output) = do + now <- getPOSIXTime + displayts zone now output displayendsizes _ = return () showsize n