aboutsummaryrefslogtreecommitdiff
path: root/Remote/Tahoe.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-11-30 15:35:53 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-11-30 15:35:53 -0400
commit27d3f477274341984015970b2600aaa0578679f9 (patch)
tree2a321bd8efddbc46ca54b4895c9970e06d1590fa /Remote/Tahoe.hs
parent6c4bf48e7176da9955e483b308d7cff4d86dc06f (diff)
tahoe: Include tahoe capabilities in whereis display.
Diffstat (limited to 'Remote/Tahoe.hs')
-rw-r--r--Remote/Tahoe.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Remote/Tahoe.hs b/Remote/Tahoe.hs
index 2ced67e30..5c28773ae 100644
--- a/Remote/Tahoe.hs
+++ b/Remote/Tahoe.hs
@@ -75,7 +75,7 @@ gen r u c gc = do
, lockContent = Nothing
, checkPresent = checkKey u hdl
, checkPresentCheap = False
- , whereisKey = Nothing
+ , whereisKey = Just (getWhereisKey u)
, remoteFsck = Nothing
, repairRepo = Nothing
, config = c
@@ -231,6 +231,12 @@ storeCapability u k cap = setRemoteState u k cap
getCapability :: UUID -> Key -> Annex (Maybe Capability)
getCapability u k = getRemoteState u k
+getWhereisKey :: UUID -> Key -> Annex [String]
+getWhereisKey u k = disp <$> getCapability u k
+ where
+ disp Nothing = []
+ disp (Just c) = [c]
+
{- tahoe put outputs a single line, containing the capability. -}
parsePut :: String -> Maybe Capability
parsePut s = case lines s of