diff options
-rw-r--r-- | Remote/BitTorrent.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bugs/addurl_magnet_could_not_download_torrent_file.mdwn | 4 |
3 files changed, 6 insertions, 1 deletions
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 diff --git a/debian/changelog b/debian/changelog index f1be1fd03..3ff3c9ae4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ git-annex (5.20150410) UNRELEASED; urgency=medium * info: Added --bytes option. * Windows: Renamed start menu file to avoid loop in some versions of Windows where the menu file is treated as a git-annex program. + * bittorrent: Fix handling of magnet links. -- Joey Hess <id@joeyh.name> Thu, 09 Apr 2015 20:59:43 -0400 diff --git a/doc/bugs/addurl_magnet_could_not_download_torrent_file.mdwn b/doc/bugs/addurl_magnet_could_not_download_torrent_file.mdwn index 855f2cfe7..f00a63a7a 100644 --- a/doc/bugs/addurl_magnet_could_not_download_torrent_file.mdwn +++ b/doc/bugs/addurl_magnet_could_not_download_torrent_file.mdwn @@ -43,3 +43,7 @@ failed git-annex: addurl: 1 failed """]] + +> Looking at the code, it was looking for a file prefixed by ".torrent", +> but of course that should be suffixed instead. So, [[fixed|done]] +> --[[Joey]] |