summaryrefslogtreecommitdiff
path: root/Remote/BitTorrent.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-17 15:37:13 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-17 15:38:00 -0400
commitbf7a816f2e36e575b3325c95ef698a4923baa5be (patch)
tree69b1c9e890cea8025f507ce1df8caa520805b875 /Remote/BitTorrent.hs
parent590ce84fb3c20a2ddebcd72308aee004107589f0 (diff)
remove default untrusted hack for bittorrent
This is better handled by checkPresent always failing.
Diffstat (limited to 'Remote/BitTorrent.hs')
-rw-r--r--Remote/BitTorrent.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/Remote/BitTorrent.hs b/Remote/BitTorrent.hs
index 082fa9394..4cb579f15 100644
--- a/Remote/BitTorrent.hs
+++ b/Remote/BitTorrent.hs
@@ -72,8 +72,7 @@ gen r _ c gc =
}
downloadKey :: Key -> AssociatedFile -> FilePath -> MeterUpdate -> Annex Bool
-downloadKey key _file dest p = do
- defaultUnTrusted
+downloadKey key _file dest p =
get . map (torrentUrlNum . fst . getDownloader) =<< getBitTorrentUrls key
where
get [] = do
@@ -109,11 +108,6 @@ dropKey k = do
checkKey :: Key -> Annex Bool
checkKey key = error "cannot reliably check torrent status"
--- Makes this remote UnTrusted, unless it already has a trust set.
-defaultUnTrusted :: Annex ()
-defaultUnTrusted = whenM (isNothing . M.lookup bitTorrentUUID <$> trustMapRaw) $
- trustSet bitTorrentUUID UnTrusted
-
getBitTorrentUrls :: Key -> Annex [URLString]
getBitTorrentUrls key = filter supported <$> getUrls key
where