add additional debug info about reasons for transfers

This commit is contained in:
Joey Hess 2013-03-01 15:23:59 -04:00
parent e2f1f7afc6
commit 46c9cbeb1e
9 changed files with 43 additions and 31 deletions

View file

@ -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