summaryrefslogtreecommitdiff
path: root/src/Data/Torrent.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Torrent.hs')
-rw-r--r--src/Data/Torrent.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs
index ad57403e..1af8ece2 100644
--- a/src/Data/Torrent.hs
+++ b/src/Data/Torrent.hs
@@ -57,7 +57,6 @@ import Prelude hiding (sum)
57import Control.Applicative 57import Control.Applicative
58import Control.Arrow 58import Control.Arrow
59import Control.Exception 59import Control.Exception
60import Control.Monad
61import Data.BEncode as BE 60import Data.BEncode as BE
62import Data.Char 61import Data.Char
63import Data.Foldable 62import Data.Foldable
@@ -359,8 +358,8 @@ isMultiFile _ = False
359 358
360-- | Read and decode a .torrent file. 359-- | Read and decode a .torrent file.
361fromFile :: FilePath -> IO Torrent 360fromFile :: FilePath -> IO Torrent
362fromFile path = do 361fromFile filepath = do
363 contents <- B.readFile path 362 contents <- B.readFile filepath
364 case decoded contents of 363 case decoded contents of
365 Right !t -> return t 364 Right !t -> return t
366 Left msg -> throwIO $ userError $ msg ++ " while reading torrent" 365 Left msg -> throwIO $ userError $ msg ++ " while reading torrent"