bittorrent: Fix handling of magnet links.

This commit is contained in:
Joey Hess 2015-04-14 12:57:01 -04:00
parent 17721c7fbe
commit efd6a8e3aa
3 changed files with 6 additions and 1 deletions

View file

@ -212,7 +212,7 @@ downloadTorrentFile u = do
downloadMagnetLink :: URLString -> FilePath -> FilePath -> Annex Bool
downloadMagnetLink u metadir dest = ifM download
( liftIO $ do
ts <- filter (".torrent" `isPrefixOf`)
ts <- filter (".torrent" `isSuffixOf`)
<$> dirContents metadir
case ts of
(t:[]) -> do