This commit is contained in:
Joey Hess 2012-04-21 23:32:33 -04:00
parent bee420bd2d
commit ed79596b75
27 changed files with 56 additions and 52 deletions

View file

@ -195,7 +195,8 @@ meteredWriteFile' meterupdate dest startstate feeder =
where
feed state [] h = do
(state', cs) <- feeder state
if null cs then return () else feed state' cs h
unless (null cs) $
feed state' cs h
feed state (c:cs) h = do
S.hPut h c
meterupdate $ toInteger $ S.length c