summaryrefslogtreecommitdiff
path: root/Logs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-01 15:23:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-01 15:23:59 -0400
commit0fa9ecb7ba54aa719dec810033b5f54ca197bf4e (patch)
treeb1179d1852450e1c7d54a99c03de2c0f9fb629a2 /Logs
parentee19c8c802bec35fe0d3b92b7f065eed819ec38f (diff)
add additional debug info about reasons for transfers
Diffstat (limited to 'Logs')
-rw-r--r--Logs/Transfer.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs
index 5818f5fc2..6d6d3d890 100644
--- a/Logs/Transfer.hs
+++ b/Logs/Transfer.hs
@@ -64,6 +64,13 @@ readLcDirection "upload" = Just Upload
readLcDirection "download" = Just Download
readLcDirection _ = Nothing
+describeTransfer :: Transfer -> TransferInfo -> String
+describeTransfer t info = unwords
+ [ show $ transferDirection t
+ , show $ transferUUID t
+ , fromMaybe (key2file $ transferKey t) (associatedFile info)
+ ]
+
{- Transfers that will accomplish the same task. -}
equivilantTransfer :: Transfer -> Transfer -> Bool
equivilantTransfer t1 t2