avoid removing a transfer being made by another process
When another process is running a transfer, if we try to run a dup it'll fail, and we should not remove the transfer from the transfer display.
This commit is contained in:
parent
7bf6ca4e0d
commit
577128e9b8
1 changed files with 4 additions and 2 deletions
|
@ -82,7 +82,8 @@ genTransfer t info = case (transferRemote info, associatedFile info) of
|
|||
- so remove the transfer from the list of current
|
||||
- transfers, just in case it didn't stop
|
||||
- in a way that lets the TransferWatcher do its
|
||||
- usual cleanup.
|
||||
- usual cleanup. However, first check if something else is
|
||||
- running the transfer, to avoid removing active transfers.
|
||||
-}
|
||||
go remote file transferrer = ifM (liftIO $ performTransfer transferrer t $ associatedFile info)
|
||||
( do
|
||||
|
@ -95,7 +96,8 @@ genTransfer t info = case (transferRemote info, associatedFile info) of
|
|||
(associatedFile info)
|
||||
(Just remote)
|
||||
void $ recordCommit
|
||||
, void $ removeTransfer t
|
||||
, whenM (liftAnnex $ isNothing <$> checkTransfer t) $
|
||||
void $ removeTransfer t
|
||||
)
|
||||
|
||||
{- Called right before a transfer begins, this is a last chance to avoid
|
||||
|
|
Loading…
Reference in a new issue