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

1
debian/changelog vendored
View file

@ -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

View file

@ -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]]