got alterTransferInfo and updateTransferInfo mixed up

The poller only alters, to avoid re-adding transfers that get removed.
The watcher updates, to add new transfers.
This commit is contained in:
Joey Hess 2012-08-29 14:05:56 -04:00
parent 7ebe1d4875
commit d2a4ffe669
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ transferPollerThread st dstatus = do
fromIntegral . fileSize
<$> getFileStatus f
when (bytesComplete info /= sz && isJust sz) $
updateTransferInfo dstatus t info
alterTransferInfo dstatus t info
{ bytesComplete = sz }
{- can't poll uploads -}
| otherwise = noop

View file

@ -64,7 +64,7 @@ onAdd st dstatus file _ = case parseTransferFile file of
]
r <- headMaybe . filter (sameuuid t) . knownRemotes
<$> getDaemonStatus dstatus
alterTransferInfo dstatus t info
updateTransferInfo dstatus t info
{ transferRemote = r }
sameuuid t r = Remote.uuid r == transferUUID t