This commit is contained in:
Joey Hess 2012-10-29 17:02:50 -04:00
parent 1852eddce6
commit d5a5c05a79
5 changed files with 15 additions and 13 deletions

View file

@ -52,6 +52,7 @@ transferPollerThread = NamedThread "TransferPoller" $ do
newsize t info sz
| bytesComplete info /= sz && isJust sz =
alterTransferInfo t (\i -> i { bytesComplete = sz })
<<~ daemonStatusHandle
withAssistant daemonStatusHandle $ \h ->
alterTransferInfo h t $
\i -> i { bytesComplete = sz }
| otherwise = noop

View file

@ -79,9 +79,9 @@ onModify file = do
Just t -> go t =<< liftIO (readTransferInfoFile Nothing file)
where
go _ Nothing = noop
go t (Just newinfo) = alterTransferInfo t
(\i -> i { bytesComplete = bytesComplete newinfo })
<<~ daemonStatusHandle
go t (Just newinfo) = withAssistant daemonStatusHandle $ \h ->
alterTransferInfo h t $
\i -> i { bytesComplete = bytesComplete newinfo }
{- This thread can only watch transfer sizes when the DirWatcher supports
- tracking modificatons to files. -}