From e2214f6ac8566c2bc8b19468f1a81c6ba2eac954 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 17 Dec 2014 15:37:13 -0400 Subject: [PATCH] remove default untrusted hack for bittorrent This is better handled by checkPresent always failing. --- Remote/BitTorrent.hs | 8 +------- doc/special_remotes/bittorrent.mdwn | 3 --- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Remote/BitTorrent.hs b/Remote/BitTorrent.hs index 082fa93946..4cb579f15e 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 diff --git a/doc/special_remotes/bittorrent.mdwn b/doc/special_remotes/bittorrent.mdwn index 7fe8ebde87..36fa1b879d 100644 --- a/doc/special_remotes/bittorrent.mdwn +++ b/doc/special_remotes/bittorrent.mdwn @@ -16,8 +16,5 @@ bittornado or the original BitTorrent client. Currently git-annex only supports downloading content from a torrent; it cannot upload or remove content. -Torrent swarms tend to come and go, so git-annex defaults to *not* -trusting the bittorrent special remote. - Multi-file torrents are supported; to handle them, `git annex addurl` will add a directory containing all the files from the torrent.