aboutsummaryrefslogtreecommitdiff
path: root/Remote/BitTorrent.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-05-22 22:41:36 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-22 22:41:36 -0400
commit280b59024768689feed03db4e7069e12f9605825 (patch)
tree2350b2747d669d44ebaafdb2b7fefe5b550b558b /Remote/BitTorrent.hs
parent0c2026f3d4109e810b050090b44bb406b6a11954 (diff)
fromkey, registerurl: Allow urls to be specified instead of keys, and generate URL keys.
This is especially useful because the caller doesn't need to generate valid url keys, which involves some escaping of characters, and may involve taking a md5sum of the url if it's too long.
Diffstat (limited to 'Remote/BitTorrent.hs')
-rw-r--r--Remote/BitTorrent.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Remote/BitTorrent.hs b/Remote/BitTorrent.hs
index 05326e390..a4ec11bf1 100644
--- a/Remote/BitTorrent.hs
+++ b/Remote/BitTorrent.hs
@@ -155,7 +155,7 @@ torrentUrlNum u
{- A Key corresponding to the URL of a torrent file. -}
torrentUrlKey :: URLString -> Annex Key
-torrentUrlKey u = fromUrl (fst $ torrentUrlNum u) Nothing
+torrentUrlKey u = return $ fromUrl (fst $ torrentUrlNum u) Nothing
{- Temporary directory used to download a torrent. -}
tmpTorrentDir :: URLString -> Annex FilePath