avoid queuing transfer that is already queued, with a different associated file

This commit is contained in:
Joey Hess 2013-04-02 16:04:49 -04:00
parent 0f6a6f2a8b
commit 1f4fe92f61

View file

@ -138,7 +138,7 @@ enqueue reason schedule t info
q <- getAssistant transferQueue q <- getAssistant transferQueue
liftIO $ atomically $ do liftIO $ atomically $ do
l <- readTVar (queuelist q) l <- readTVar (queuelist q)
if (new `notElem` l) if (t `notElem` map fst l)
then do then do
void $ modifyTVar' (queuesize q) succ void $ modifyTVar' (queuesize q) succ
void $ modifyTVar' (queuelist q) modlist void $ modifyTVar' (queuelist q) modlist