fix alterTransferInfo
don't want to stomp over fields other than the ones being changed
This commit is contained in:
parent
34aeecb78a
commit
4004baafaf
3 changed files with 10 additions and 16 deletions
|
@ -192,9 +192,8 @@ adjustTransfersSTM dstatus a = do
|
|||
putTMVar dstatus $ s { currentTransfers = a (currentTransfers s) }
|
||||
|
||||
{- Alters a transfer's info, if the transfer is in the map. -}
|
||||
alterTransferInfo :: DaemonStatusHandle -> Transfer -> TransferInfo -> IO ()
|
||||
alterTransferInfo dstatus t info = updateTransferInfo' dstatus $
|
||||
M.adjust (const info) t
|
||||
alterTransferInfo :: DaemonStatusHandle -> Transfer -> (TransferInfo -> TransferInfo) -> IO ()
|
||||
alterTransferInfo dstatus t a = updateTransferInfo' dstatus $ M.adjust a t
|
||||
|
||||
{- Updates a transfer's info. Adds the transfer to the map if necessary,
|
||||
- or if already present, updates it while preserving the old transferTid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue