From c4fc56cfdcebf64870a0a4db47dae5071f81ac56 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 14 Apr 2015 12:57:01 -0400 Subject: bittorrent: Fix handling of magnet links. --- Remote/BitTorrent.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Remote') diff --git a/Remote/BitTorrent.hs b/Remote/BitTorrent.hs index 2770f30ae..baba2e23e 100644 --- a/Remote/BitTorrent.hs +++ b/Remote/BitTorrent.hs @@ -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 -- cgit v1.2.3