remove default untrusted hack for bittorrent
This is better handled by checkPresent always failing.
This commit is contained in:
parent
e08fa65131
commit
e2214f6ac8
2 changed files with 1 additions and 10 deletions
|
@ -72,8 +72,7 @@ gen r _ c gc =
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadKey :: Key -> AssociatedFile -> FilePath -> MeterUpdate -> Annex Bool
|
downloadKey :: Key -> AssociatedFile -> FilePath -> MeterUpdate -> Annex Bool
|
||||||
downloadKey key _file dest p = do
|
downloadKey key _file dest p =
|
||||||
defaultUnTrusted
|
|
||||||
get . map (torrentUrlNum . fst . getDownloader) =<< getBitTorrentUrls key
|
get . map (torrentUrlNum . fst . getDownloader) =<< getBitTorrentUrls key
|
||||||
where
|
where
|
||||||
get [] = do
|
get [] = do
|
||||||
|
@ -109,11 +108,6 @@ dropKey k = do
|
||||||
checkKey :: Key -> Annex Bool
|
checkKey :: Key -> Annex Bool
|
||||||
checkKey key = error "cannot reliably check torrent status"
|
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 -> Annex [URLString]
|
||||||
getBitTorrentUrls key = filter supported <$> getUrls key
|
getBitTorrentUrls key = filter supported <$> getUrls key
|
||||||
where
|
where
|
||||||
|
|
|
@ -16,8 +16,5 @@ bittornado or the original BitTorrent client.
|
||||||
Currently git-annex only supports downloading content from a torrent;
|
Currently git-annex only supports downloading content from a torrent;
|
||||||
it cannot upload or remove content.
|
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`
|
Multi-file torrents are supported; to handle them, `git annex addurl`
|
||||||
will add a directory containing all the files from the torrent.
|
will add a directory containing all the files from the torrent.
|
||||||
|
|
Loading…
Add table
Reference in a new issue