summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-27 14:04:06 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-27 14:04:06 -0400
commitd21c4094b2a3322a624cefeff248c15fc0396752 (patch)
treee52985c0dcf6a6285dd10063208463d43ab81677
parent11c1f32c51707e838dd154afe3d2a1d25e9d18ef (diff)
look up Remote when a transfer appears
Fixes display of the remote name in the dashboard.
-rw-r--r--Assistant/Threads/TransferWatcher.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Assistant/Threads/TransferWatcher.hs b/Assistant/Threads/TransferWatcher.hs
index 66c916990..fe8af9aad 100644
--- a/Assistant/Threads/TransferWatcher.hs
+++ b/Assistant/Threads/TransferWatcher.hs
@@ -13,6 +13,7 @@ import Assistant.DaemonStatus
import Logs.Transfer
import Utility.DirWatcher
import Utility.Types.DirWatcher
+import qualified Remote
thisThread :: ThreadName
thisThread = "TransferWatcher"
@@ -61,7 +62,11 @@ onAdd st dstatus file _ = case parseTransferFile file of
[ "transfer starting:"
, show t
]
+ r <- headMaybe . filter (sameuuid t) . knownRemotes
+ <$> getDaemonStatus dstatus
updateTransferInfo dstatus t info
+ { transferRemote = r }
+ sameuuid t r = Remote.uuid r == transferUUID t
{- Called when a transfer information file is removed. -}
onDel :: Handler