avoid possibly re-adding a removed transfer when updating its info
Doesn't fix the bug I thought it'd fix, but is clearly correct.
This commit is contained in:
parent
7024a973b2
commit
1296cfb09a
4 changed files with 22 additions and 13 deletions
|
@ -41,8 +41,7 @@ transferPollerThread st dstatus = do
|
|||
sz <- catchMaybeIO $
|
||||
fromIntegral . fileSize
|
||||
<$> getFileStatus f
|
||||
when (bytesComplete info /= sz && isJust sz) $ do
|
||||
putStrLn $ "download size " ++ show sz
|
||||
when (bytesComplete info /= sz && isJust sz) $
|
||||
updateTransferInfo dstatus t info
|
||||
{ bytesComplete = sz }
|
||||
{- can't poll uploads -}
|
||||
|
|
|
@ -64,7 +64,7 @@ onAdd st dstatus file _ = case parseTransferFile file of
|
|||
]
|
||||
r <- headMaybe . filter (sameuuid t) . knownRemotes
|
||||
<$> getDaemonStatus dstatus
|
||||
updateTransferInfo dstatus t info
|
||||
alterTransferInfo dstatus t info
|
||||
{ transferRemote = r }
|
||||
sameuuid t r = Remote.uuid r == transferUUID t
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue