diff options
author | 2012-08-29 14:05:56 -0400 | |
---|---|---|
committer | 2012-08-29 14:05:56 -0400 | |
commit | d2a4ffe669b6aeec0b660b08099aa56d3208daa7 (patch) | |
tree | 51656d9fb18b08ce2b10f537973a0d9e4f628ef5 /Assistant | |
parent | 7ebe1d48754b068d0f79fc88cf45d67b8ae69bde (diff) |
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.
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Threads/TransferPoller.hs | 2 | ||||
-rw-r--r-- | Assistant/Threads/TransferWatcher.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/Threads/TransferPoller.hs b/Assistant/Threads/TransferPoller.hs index 12394373f..8839045df 100644 --- a/Assistant/Threads/TransferPoller.hs +++ b/Assistant/Threads/TransferPoller.hs @@ -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 diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs index 31116a724..fe8af9aad 100644 --- a/Assistant/Threads/TransferWatcher.hs +++ b/Assistant/Threads/TransferWatcher.hs @@ -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 |