summaryrefslogtreecommitdiff
path: root/Assistant/Threads/TransferWatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-07 11:17:20 -0600
committerGravatar Joey Hess <joey@kitenet.net>2012-07-07 11:17:20 -0600
commitc8691d76aa9a438c17a1c15ac01495d782fa84db (patch)
treedf7eb43f311c8c4e3f1d467d2d506a33adccbcd7 /Assistant/Threads/TransferWatcher.hs
parent8939ef3121480a9f78bacb26b971fa897049e5c5 (diff)
bugfix
Diffstat (limited to 'Assistant/Threads/TransferWatcher.hs')
-rw-r--r--Assistant/Threads/TransferWatcher.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs
index aa8b3f6e6..5be63fce4 100644
--- a/Assistant/Threads/TransferWatcher.hs
+++ b/Assistant/Threads/TransferWatcher.hs
@@ -57,7 +57,9 @@ onAdd st dstatus _ file _ = case parseTransferFile file of
where
go _ Nothing = noop -- transfer already finished
go t (Just info) = adjustTransfers dstatus $
- M.insertWith' const t info
+ M.insertWith' merge t info
+ -- preseve shouldWait flag, which is not written to disk
+ merge new old = new { shouldWait = shouldWait old }
{- Called when a transfer information file is removed.
-