tweak
This commit is contained in:
parent
1852eddce6
commit
d5a5c05a79
5 changed files with 15 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue