diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-02 16:39:11 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-02 16:39:11 -0400 |
commit | 1f84c522a7f538ba7000f7dbd0f3141ac463d976 (patch) | |
tree | 25ea9b700253cd282afff72f0f99691fec8369bf /Assistant/Threads | |
parent | b9663fab96eb6086d0f26b7f0fe5d88c0fbe9257 (diff) |
more efficient uuid to remote lookup
Diffstat (limited to 'Assistant/Threads')
-rw-r--r-- | Assistant/Threads/TransferWatcher.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs index 69fa87022..7045e842d 100644 --- a/Assistant/Threads/TransferWatcher.hs +++ b/Assistant/Threads/TransferWatcher.hs @@ -62,10 +62,8 @@ onAdd file = case parseTransferFile file of go _ Nothing = noop -- transfer already finished go t (Just info) = do debug [ "transfer starting:", describeTransfer t info ] - r <- headMaybe . filter (sameuuid t) - <$> liftAnnex Remote.remoteList + r <- liftAnnex $ Remote.remoteFromUUID $ transferUUID t updateTransferInfo t info { transferRemote = r } - sameuuid t r = Remote.uuid r == transferUUID t {- Called when a transfer information file is updated. - |